class_docstr: Kolmogorov-Smirnov Windowing method for concept drift detection.
  
  Parameters
  ----------
  alpha
      Probability for the test statistic of the Kolmogorov-Smirnov-Test. The alpha parameter is
      very sensitive, therefore should be set below 0.01.
  window_size
      Size of the sliding window.
  stat_size
      Size of the statistic window.
  window
      Already collected data to avoid cold start.
  seed
      Random seed for reproducibility.
  
  Notes
  -----
  KSWIN (Kolmogorov-Smirnov Windowing) is a concept change detection method based
  on the Kolmogorov-Smirnov (KS) statistical test. KS-test is a statistical test with
  no assumption of underlying data distribution. KSWIN can monitor data or performance
  distributions. Note that the detector accepts one dimensional input as array.
  
  KSWIN maintains a sliding window $\Psi$ of fixed size $n$ (window_size). The
  last $r$ (stat_size) samples of $\Psi$ are assumed to represent the last
  concept considered as $R$. From the first $n-r$ samples of $\Psi$,
  $r$ samples are uniformly drawn, representing an approximated last concept $W$.
  
  The KS-test is performed on the windows $R$ and $W$ of the same size. KS
  -test compares the distance of the empirical cumulative data distribution $dist(R,W)$.
  
  A concept drift is detected by KSWIN if:
  
  $$
  dist(R,W) > \sqrt{-\frac{ln\alpha}{r}}
  $$
  
  The difference in empirical data distributions between the windows $R$ and $W$ is too large
  since $R$ and $W$ come from the same distribution.
  
  Examples
  --------
  >>> import random
  >>> from river import drift
  
  >>> rng = random.Random(12345)
  >>> kswin = drift.KSWIN(alpha=0.0001, seed=42)
  
  >>> # Simulate a data stream composed by two data distributions
  >>> data_stream = rng.choices([0, 1], k=1000) + rng.choices(range(4, 8), k=1000)
  
  >>> # Update drift detector and verify if change is detected
  >>> for i, val in enumerate(data_stream):
  ...     kswin.update(val)
  ...     if kswin.drift_detected:
  ...         print(f"Change detected at index {i}, input value: {val}")
  Change detected at index 1016, input value: 6
  
  References
  ----------
  [^1]: Christoph Raab, Moritz Heusinger, Frank-Michael Schleif, Reactive Soft Prototype Computing for
  Concept Drift Streams, Neurocomputing, 2020,
code: def _reset(self):
      super()._reset()
      self.p_value = 0
      self.n = 0
      self.window: collections.deque = collections.deque(
          maxlen=self.window_size
      )
      self._rng = random.Random(self.seed)
  
file_path: river/river/drift/kswin.py
imports: from __future__ import annotations
  import collections
  import itertools
  import random
  import typing
  import warnings
  from scipy import stats
  from river.base import DriftDetector
label_desc: Use image node_id 2 for calling the KSWIN obj's underlying member method code with example usage: obj._reset() without return types