Skip to content

venn_abers

The venn_abers pack checks Venn-Abers calibration split leakage, inductive and cross-Venn-Abers required parameters, stratified-split contracts, and reproducible seeds against venn-abers 1.5.4 on files that import venn_abers.

Rules Safe fix Unsafe fix Manual fix
5 0 0 5
Rule Severity Fix What it finds
venn-abers-on-training-rows error none Venn-Abers probability calibration relies on exchangeability between the calibration rows and test rows.

Inductive and cross-Venn-Abers configuration

Section titled “Inductive and cross-Venn-Abers configuration”
Rule Severity Fix What it finds
cross-missing-n-splits error none VennAbersCalibrator, VennAbersMultiClass, VennAbersCV, and VennAbersRegressor default n_splits=None even though Cross Venn-Abers (inductive=False) requires n_splits to be set.
inductive-missing-cal-size error none Inductive Venn-Abers (inductive=True, the default on VennAbersCalibrator and VennAbersRegressor) splits training data into proper-training and calibration sets and requires either cal_size or train_proper_size.
stratify-without-shuffle error none VennAbersCalibrator, VennAbersMultiClass, and VennAbersCV delegate inductive splitting to sklearn.model_selection.train_test_split, which raises ValueError: Stratified train/test split is not implemented for shuffle=False whenever stratify is set while shuffle=False (note that VennAbersCV and VennAbersMultiClass default to shuffle=False).
unseeded-calibration-split warning none VennAbersCalibrator and VennAbersRegressor default to shuffle=True, random_state=None, and VennAbersCV/VennAbersMultiClass shuffle whenever shuffle=True.