fippy/marginalize-missing-n-samples
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| fippy | error | none, edit by hand | All versions |
In fippy.Explainer.loo() and shapley(), restriction="marginalize" requires n_samples= while restriction="resample" forbids n_samples=. Violating either raises ValueError.
res = explainer.loo(X_val, y_val, "marginalize", distribution="marginal")res = explainer.loo(X_val, y_val, "marginalize", distribution="marginal", n_samples=50)What the rule reports
Section titled “What the rule reports”Calls to .loo(...) or .shapley(...) using "marginalize" without n_samples=, or using "resample" with a non-None n_samples=.
How to fix it
Section titled “How to fix it”Provide a positive integer n_samples= for "marginalize", and omit n_samples= for "resample".
Diagnostic message
Section titled “Diagnostic message”fippy restriction='marginalize' requires n_samples= and raises ValueError when omitted or None. Pass n_samples= (for example n_samples=50).See all rules in the fippy pack.