class_docstr: Base class for the sRP ensemble family
class_docstr_tok: ["Base","class","for","the","sRP","ensemble","family"]
code: def __init__(
      self,
      model: base.Estimator | None = None,
      n_models: int = 100,
      subspace_size: int | float | str = 0.6,
      training_method: str = "patches",
      lam: float = 6.0,
      drift_detector: base.DriftDetector | None = None,
      warning_detector: base.DriftDetector | None = None,
      disable_detector: str = "off",
      disable_weighted_vote: bool = False,
      seed: int | None = None,
      metric: Metric | None = None,
  ):
      # List of models is properly initialized later
      super().__init__([])  # type: ignore
      self.model = model  # Not restricted to a specific base estimator.
      self.n_models = n_models
      self.subspace_size = subspace_size
      self.training_method = training_method
      self.lam = lam
      self.drift_detector = drift_detector
      self.warning_detector = warning_detector
      self.disable_weighted_vote = disable_weighted_vote
      self.disable_detector = disable_detector
      self.metric = metric
      self.seed = seed
      self._rng = random.Random(self.seed)
  
      self._n_samples_seen = 0
      self._subspaces: list = []
  
      # defined by extended classes
      self._base_learner_class: BaseSRPClassifier | BaseSRPRegressor | None = (
          None
      )
  
imports: from __future__ import annotations
  import collections
  import itertools
  import math
  import random
  import numpy
  from river import base
  from river.drift import ADWIN
  from river.metrics import MAE, Accuracy
  from river.metrics.base import ClassificationMetric, Metric, RegressionMetric
  from river.tree import HoeffdingTreeClassifier, HoeffdingTreeRegressor
  from river.utils.random import poisson
label_desc: Use image node_id 1 to create a new BaseSRPEnsemble object from inherited base classes: base, base with example: obj = BaseSRPEnsemble(model, n_models, subspace_size, training_method, lam, drift_detector, warning_detector, disable_detector, disable_weighted_vote, seed, metric)