Skip to content

Detectors

class RareCategoryDetector

RareCategoryDetector.__init__

def __init__(min_occurrences: int = 1) -> None

Detect rare categories.

Arguments:

  • min_occurrences - The minimum number of occurrences for a category to avoid detection.

class SpecialValuesDetector

SpecialValuesDetector.__init__

def __init__(values: Sequence) -> None

Detect specific given values.

Arguments:

  • values - The sequence of values to be detected.

class RangeValueDetector

RangeValueDetector.__init__

def __init__(min_val: float | int | datetime | str,
max_val: float | int | datetime | str) -> None

Detect values within a range.

Arguments:

  • min_val - The minimum value of the range.
  • max_val - The maximum value of the range.

class AggregateDetector

AggregateDetector.__init__

def __init__(detectors: Sequence[Detector] = ()) -> None

List of detectors to be simultaneously applied to the data.

Arguments:

  • detectors - A sequence of Detector objects.

class ThresholdCategoryDetector

ThresholdCategoryDetector.__init__

def __init__(threshold: float = 0.99) -> None

Detect the lowest frequency categories in order to avoid detection of a given minimal fraction of the total number of categories.

Arguments:

  • threshold - The minimal fraction of the total number of categories to avoid detection. Must be a float between 0 and 1.

class DateTimeRangeValueDetector

DateTimeRangeValueDetector.__init__

def __init__(min_val: str | datetime,
max_val: str | datetime,
fmt: str | None = None) -> None

Detect datetime values within a range.

Arguments:

  • min_val - The minimum value of the range.
  • max_val - The maximum value of the range.
  • fmt - The datetime format. If None, it will be automatically inferred.

class TimeRangeValueDetector

TimeRangeValueDetector.__init__

def __init__(min_val: str | datetime, max_val: str | datetime) -> None

Detect time values within a range.

Arguments:

  • min_val - The minimum value of the range.
  • max_val - The maximum value of the range.

class QuantileTailsDetector

QuantileTailsDetector.__init__

def __init__(quantile: float = 0.005, side: str | Side = Side.BOTH) -> None

Detect values in the tails of the data distribution.

Arguments:

  • quantile - The quantile defining the tails. Must be between 0 and 1.
  • side - The side of the distribution to consider. Should be a Side object or a string representing a Side.

class DateTimeQuantileTailsDetector

DateTimeQuantileTailsDetector.__init__

def __init__(quantile: float = 0.005,
side: Side = Side.BOTH,
fmt: str | None = None) -> None

Detect datetime values in the tails of the data distribution.

Arguments:

  • quantile - The quantile defining the tails. Must be between 0 and 1.
  • side - The side of the distribution to consider. Should be a Side object or a string representing a Side.
  • fmt - The datetime format. If None, it will be automatically inferred.