Skip to content

Commit 8b14bc1

Browse files
Add missing CUSUM __init__ method
1 parent aafd32c commit 8b14bc1

File tree

1 file changed

+15
-0
lines changed
  • frouros/detectors/concept_drift/streaming/change_detection

1 file changed

+15
-0
lines changed

frouros/detectors/concept_drift/streaming/change_detection/cusum.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""CUSUM module."""
22

3+
from typing import Optional, Union, List
4+
35
import numpy as np # type: ignore
46

7+
from frouros.callbacks.streaming.base import BaseCallbackStreaming
58
from frouros.detectors.concept_drift.streaming.change_detection.base import (
69
BaseCUSUM,
710
BaseCUSUMConfig,
@@ -71,6 +74,18 @@ class CUSUM(BaseCUSUM):
7174

7275
config_type = CUSUMConfig # type: ignore
7376

77+
def __init__( # noqa: D107
78+
self,
79+
config: Optional[CUSUMConfig] = None,
80+
callbacks: Optional[
81+
Union[BaseCallbackStreaming, List[BaseCallbackStreaming]]
82+
] = None,
83+
) -> None:
84+
super().__init__(
85+
config=config,
86+
callbacks=callbacks,
87+
)
88+
7489
def _update_sum(self, error_rate: float) -> None:
7590
self.sum_ = np.maximum(
7691
0,

0 commit comments

Comments
 (0)