v0.9.1 (12/6/2026)
Features
-
The method
predict_setofWrapClassifiernow includes an argumentlabels, which if set to True (the default), outputs prediction sets in the form of a list of lists of labels, relying on the labels being provided in the attributeclasses_of the wrapped learner. Alternatively, label names can be specified by providing a list or array of labels (overriding any label names provided byclasses_). If instead a binary array indicating presence of labels in each prediction set is desired,labelsshould set to False. Note that the default behavior ofpredict_setofWrapClassifieris different from in previous versions, where the only option was to get prediction sets in the form of a binary array. -
The method
predict_setofConformalClassifiernow includes an argumentlabels, which if set to None (the default), generates prediction sets in the form of a binary array. If insteadlabelsis set to a list or array of labels, the output prediction sets will be represented by a list of lists of labels. -
The method
semi_online_p_valuesin the modulecrepes.martingalesfor generating (smoothed) p-values from non-conformity scores in the semi-online mode has been optimized for non-unique non-conformity scores, resulting in O(n * k) where k is number of unique values among the n non-conformity scores. It is enabled through the optionoptimized=True. Thanks to @claude for contributing with the optimization. -
The option
return_indexis now available for theapplymethods ofSimpleJumper,SleeperStayer,SleeperDrifterandCompositeMartingalein the modulecrepes.martingales, which if set to True, results in that the index of the first martingale value that reaches a specified threshold (c) is returned. By settingreturn_indexto False, martingale values up to and including the first that reaches a specified threshold will instead be returned. In the previous version, an index was always returned when a threshold was specified. -
The
applymethod of theCompositeMartingalehas been optimized by terminating the computation of each of the k martingales when reaching k * c, for a specified threshold c. -
The
binningmethod increpes.extrashas been modified to allow for setting a factor (epsilon) to use when multiplying with a random number to handle ties. By settingepsilonto 0, random tiebreaking is not employed. Thebinningmethod now also includes an additional argumentmin_size(default=None), which results in equal-sized binning with the largest number of bins such that the minimum number of values in each bin is at leastmin_size. A warning will be issued when forming bins if the provided number of bins is larger than the number of values (or the number of unique values if epsilon=0), as well as ifmin_sizeallows for forming one bin only. Thanks to @rudymatela for highlighting issues with thebinningmethod.
Fixes
- A minor bug in the documentation has been fixed. Thanks to @KonstantinosTsoumas for pointing it out.