venn_abers/cross-missing-n-splits
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| venn_abers | error | none, edit by hand | All versions |
VennAbersCalibrator, VennAbersMultiClass, VennAbersCV, and VennAbersRegressor default n_splits=None even though Cross Venn-Abers (inductive=False) requires n_splits to be set. Omitting n_splits raises Exception: For Cross Venn-ABERS please provide n_splits (or TypeError in VennAbersCV) during fit().
va = VennAbersCalibrator(estimator=clf, inductive=False, random_state=0)va = VennAbersCalibrator(estimator=clf, inductive=False, n_splits=5, random_state=0)What the rule reports
Section titled “What the rule reports”Calls to VennAbersCalibrator, VennAbersMultiClass, VennAbersCV, or VennAbersRegressor with inductive=False and n_splits omitted or None.
How to fix it
Section titled “How to fix it”Pass an integer n_splits >= 2 (for example n_splits=5).
Diagnostic message
Section titled “Diagnostic message”Cross Venn-Abers (inductive=False) defaults n_splits=None and raises Exception("For Cross Venn-ABERS please provide n_splits") at fit time. Pass an integer n_splits >= 2 (for example n_splits=5).See all rules in the venn_abers pack.