class_docstr: Base class for estimators (classifiers or regressors) in SRP
class_docstr_tok: ["Base","class","for","estimators","(","classifiers","or","regressors",")","in","SRP"]
code: def __init__(
      self,
      idx_original: int,
      model: base.Estimator,
      metric: Metric,
      created_on: int,
      drift_detector: base.DriftDetector,
      warning_detector: base.DriftDetector,
      is_background_learner,
      rng: random.Random,
      features=None,
  ):
      self.idx_original = idx_original
      self.created_on = created_on
      self.model = model.clone()
      self.metric = metric.clone()
  
      # Store current model subspace representation of the original instances
      self.features = features
  
      # Drift and warning detection
      if drift_detector is not None:
          self.disable_drift_detector = False
          self.drift_detector = (
              drift_detector.clone()
          )  # Actual detector used
      else:
          self.disable_drift_detector = True
          self.drift_detector = None
  
      if warning_detector is not None:
          self.disable_background_learner = False
          self.warning_detector = (
              warning_detector.clone()
          )  # Actual detector used
      else:
          self.disable_background_learner = True
          self.warning_detector = None
  
      # Background learner
      self.is_background_learner = is_background_learner
  
      # Statistics
      self.n_drifts_detected = 0
      self.n_warnings_detected = 0
  
      # Random number generator (initialized)
      self.rng = rng
  
      # Background learner
      self._background_learner: 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 BaseSRPEstimator object  with example: obj = BaseSRPEstimator(idx_original, model, metric, created_on, drift_detector, warning_detector, is_background_learner, rng, features)