Skip to content

Commit

Permalink
update FAQ on monotonicity (#531)
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Chomiak <chomiak.krzysztof@gmail.com>
  • Loading branch information
Krzys25 authored Apr 22, 2024
1 parent d690a16 commit a131072
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit a131072

Please sign in to comment.