nessie.detectors.baselines
Module Contents
Classes
The majority baseline computes the most common label seen and then simply |
|
This majority baseline computes the most common label seen per surface form and then simply |
- class nessie.detectors.baselines.MajorityLabelBaseline
Bases:
nessie.detectors.error_detector.Detector
The majority baseline computes the most common label seen and then simply flags all items that are disagreeing with it.
- correct(self, texts: nessie.types.StringArray, labels: nessie.types.StringArray, **kwargs) numpy.typing.NDArray[str]
- error_detector_kind(self) nessie.detectors.error_detector.DetectorKind
- score(self, texts: nessie.types.StringArray, labels: nessie.types.StringArray, **kwargs) numpy.typing.NDArray[bool]
- supports_correction(self) bool
- class nessie.detectors.baselines.MajorityLabelPerSurfaceFormBaseline
Bases:
nessie.detectors.error_detector.Detector
This majority baseline computes the most common label seen per surface form and then simply flags items that are disagreeing with it. This is more useful for token and span labeling, as there are more repeated surface forms. For instance, if Obama has been seen twice as person and once as a location, then the instance with location is getting flagged.
- correct(self, texts: nessie.types.StringArray, labels: nessie.types.StringArray, **kwargs) numpy.typing.NDArray[str]
- error_detector_kind(self) nessie.detectors.error_detector.DetectorKind
- score(self, texts: nessie.types.StringArray, labels: nessie.types.StringArray, **kwargs) numpy.typing.NDArray[bool]
- supports_correction(self) bool