module prediction.evaluation.measures.mean_drift_restoration_time

Drift Restoration Time Measure.

This function returns the mean drift restoration time, i.e. the average number of iterations (time steps) after a known concept drift, before the previous performance has been restored. It is hence a measure to quantify the adaptability of a predictor under concept drift.

Copyright (C) 2022 Johannes Haug.


function mean_drift_restoration_time

mean_drift_restoration_time(
    result: dict,
    known_drifts: Union[List[int], List[tuple]],
    batch_size: int,
    reference_measure: Callable = <function zero_one_loss at 0x11d1669d0>,
    reference_measure_kwargs: Optional[dict] = None,
    incr: bool = False,
    interval: int = 10
) → float

Calculates the mean restoration time after known concept drifts.

Args:

  • result: A result dictionary from the PredictionEvaluator object.
  • known_drifts: The positions in the dataset (indices) corresponding to known concept drifts.
  • batch_size: The number of observations processed per iteration/time step.
  • reference_measure: Evaluation measure function.
  • reference_measure_kwargs: Keyword arguments of the reference measure. This attribute is maintained for consistency reasons, but is not used by this performance measure.
  • incr: Boolean indicating whether the evaluation measure is incremental (i.e. higher is better).
  • interval: Scalar specifying the size of the interval (i.e. number of time steps) after known concept drift, in which we investigate a performance decay of the reference measure.

Returns:

  • float: Current mean no. of iterations before recovery from (known) concept drifts.

This file was automatically generated via lazydocs.