@@ -41,8 +41,8 @@ def __init__( # noqa: D107
4141class CUSUM (BaseCUSUM ):
4242 """CUSUM [page1954continuous]_ detector.
4343
44- :param config: configuration object of the detector
45- :type config: CUSUMConfig
44+ :param config: configuration object of the detector, defaults to None. If None, the default configuration of :class:`CUSUMConfig` is used.
45+ :type config: Optional[ CUSUMConfig]
4646 :param callbacks: callbacks, defaults to None
4747 :type callbacks: Optional[Union[BaseCallbackStreaming, List[BaseCallbackStreaming]]]
4848
@@ -54,20 +54,20 @@ class CUSUM(BaseCUSUM):
5454
5555 :Example:
5656
57- >>> from frouros.detectors.concept_drift import CUSUM, CUSUMConfig
57+ >>> from frouros.detectors.concept_drift import CUSUM
5858 >>> import numpy as np
5959 >>> np.random.seed(seed=31)
6060 >>> dist_a = np.random.normal(loc=0.2, scale=0.01, size=1000)
6161 >>> dist_b = np.random.normal(loc=0.8, scale=0.04, size=1000)
6262 >>> stream = np.concatenate((dist_a, dist_b))
63- >>> detector = CUSUM(config=CUSUMConfig() )
63+ >>> detector = CUSUM()
6464 >>> for i, value in enumerate(stream):
6565 ... _ = detector.update(value=value)
6666 ... if detector.drift:
6767 ... print(f"Change detected at index {i}")
6868 ... break
6969 Change detected at index 1086
70- """
70+ """ # noqa: E501
7171
7272 config_type = CUSUMConfig # type: ignore
7373
0 commit comments