nessie.detectors.ensemble

Module Contents

Classes

MajorityVotingEnsemble

class nessie.detectors.ensemble.MajorityVotingEnsemble

Bases: nessie.detectors.error_detector.Detector

correct(self, ensemble_predictions: numpy.ndarray, **kwargs) numpy.ndarray
error_detector_kind(self) nessie.detectors.error_detector.DetectorKind
score(self, labels: nessie.types.StringArray, ensemble_predictions: nessie.types.StringArray2D, **kwargs) numpy.typing.NDArray[bool]

Flag instances where majority predictions disagree with given labels.

Parameters
  • labels – a (num_samples, ) numpy array

  • ensemble_predictions – a (num_models, num_samples) numpy array containing predictions for each model

Returns

a (num_samples, ) numpy array containing where items are flagged that disagree with the majority vote

supports_correction(self) bool