Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update FAQ on monotonicity #531

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/interpret/faq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@
"source": [
"<h2>Can we enforce monotonicity for individual EBM terms?</h2>\n",
"\n",
"We currently cannot do this through training, but it is possible to enforce monotonicity through postprocessing a graph. We generally recommend using [isotonic regression](https://scikit-learn.org/stable/modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression) on each graph output to force positive or negative monotonicity. Code examples coming soon!"
"It is possible to enforce monotonicity for individual terms in an EBM via two methods:\n:",
"\n",
"- By setting `monotone_constraints` in the `ExplainableBoostingClassifier` or `ExplainableBoostingRegressor` constructor. This parameter is a list of integers, where each integer corresponds to the monotonicity constraint for the corresponding feature. A value of -1 enforces decreasing monotonicity, 0 enforces no monotonicity, and 1 enforces increasing monotonicity. For example, `monotone_constraints=[1, -1, 0]` would enforce increasing monotonicity for the first feature, decreasing monotonicity for the second feature, and no monotonicity for the third feature.\n",
"\n",
"- Through postprocessing a graph. We generally recommend using [isotonic regression](https://scikit-learn.org/stable/modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression) on each graph output to force positive or negative monotonicity. This can be done by calling the `monotonize` method on the EBM object.",
"\n",
"Postprocessing is the recommended method, as it prevents the model from compensating for the monotonicity constraints by learning non-monotonic effects in other highly-correlated features."
]
},
{
Expand Down