module change_detection.tornado.page_hinkley

Page Hinkley Drift Detection Method.

The source code was adopted from tornado, please cite:

The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com

Original Paper: Page, Ewan S. "Continuous inspection schemes." Published in: Biometrika 41.1/2 (1954): 100-115. URL: http://www.jstor.org/stable/2333009

Copyright (C) 2022 Johannes Haug.


class PageHinkley

Page Hinkley drift detector.

method PageHinkley.__init__

__init__(
    min_instance: int = 30,
    delta: float = 0.005,
    lambda_: int = 50,
    alpha: float = 0.9999,
    reset_after_drift: bool = False
)

Inits the change detector

Args:

  • min_instance: Todo (left unspecified by the Tornado library).
  • delta: Todo (left unspecified by the Tornado library).
  • lambda_: Todo (left unspecified by the Tornado library).
  • alpha: Todo (left unspecified by the Tornado library).
  • reset_after_drift: A boolean indicating if the change detector will be reset after a drift was detected.

method PageHinkley.detect_change

detect_change() → bool

Detects global concept drift.

Returns:

  • bool: True, if a concept drift was detected, False otherwise.

method PageHinkley.detect_partial_change

detect_partial_change() → Tuple[bool, list]

Detects partial concept drift.

Notes:

Page Hinkley does not detect partial change.


method PageHinkley.detect_warning_zone

detect_warning_zone() → bool

Detects a warning zone.

Notes:

Page Hinkley does not raise warnings.


method PageHinkley.partial_fit

partial_fit(pr_scores: List[bool])

Updates the change detector.

Args:

  • pr_scores: A boolean vector indicating correct predictions. 'True' values indicate that the prediction by the online learner was correct, otherwise the vector contains 'False'.

method PageHinkley.reset

reset()

Resets the change detector.


This file was automatically generated via lazydocs.