module pipeline.prequential_pipeline

Prequential Pipeline.

This module implements a pipeline following the prequential (i.e. test-then-train) evaluation strategy.

Copyright (C) 2022 Johannes Haug.


class PrequentialPipeline

Pipeline class for prequential evaluation.

method PrequentialPipeline.__init__

__init__(
    data_loader: float.data.data_loader.DataLoader,
    predictor: Union[float.prediction.base_predictor.BasePredictor, List[float.prediction.base_predictor.BasePredictor]],
    prediction_evaluator: float.prediction.evaluation.prediction_evaluator.PredictionEvaluator,
    change_detector: Optional[float.change_detection.base_change_detector.BaseChangeDetector] = None,
    change_detection_evaluator: Optional[float.change_detection.evaluation.change_detection_evaluator.ChangeDetectionEvaluator] = None,
    feature_selector: Optional[float.feature_selection.base_feature_selector.BaseFeatureSelector] = None,
    feature_selection_evaluator: Optional[float.feature_selection.evaluation.feature_selection_evaluator.FeatureSelectionEvaluator] = None,
    batch_size: int = 1,
    n_pretrain: int = 100,
    n_max: int = inf,
    label_delay_range: Optional[tuple] = None,
    estimate_memory_alloc: bool = False,
    random_state: int = 0
)

Initializes the pipeline.

Args:

  • data_loader: Data loader object.
  • predictor: Predictor object or list of predictor objects.
  • prediction_evaluator: Evaluator object for the predictive model(s).
  • change_detector: Concept drift detection model.
  • change_detection_evaluator: Evaluator for active concept drift detection.
  • feature_selector: Online feature selection model.
  • feature_selection_evaluator: Evaluator for the online feature selection.
  • batch_size: Batch size, i.e. no. of observations drawn from the data loader at one time step.
  • n_pretrain: Number of observations used for the initial training of the predictive model.
  • n_max: Maximum number of observations used in the evaluation.
  • label_delay_range: The min and max delay in the availability of labels in time steps. The delay is sampled uniformly from this range.
  • estimate_memory_alloc: Boolean that indicates if the method-wise change in allocated memory (GB) shall be monitored. Note that this delivers only an indication of the approximate memory consumption and can significantly increase the total run time of the pipeline.
  • random_state: A random integer seed used to specify a random number generator.

method PrequentialPipeline.run

run()

Runs the pipeline.


This file was automatically generated via lazydocs.