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 reset(self, all_features: list, n_samples_seen: int):
      if (
          not self.disable_background_learner
          and self._background_learner is not None
      ):
          # Replace model with the corresponding background model
          self.model = self._background_learner.model
          self.drift_detector = self._background_learner.drift_detector
          self.warning_detector = (
              self._background_learner.warning_detector
          )
          self.metric = self._background_learner.metric
          self.created_on = self._background_learner.created_on
          self.features = self._background_learner.features
          self._background_learner = None
      else:
          # Randomly generate a new subspace from all the original features
          subspace = (
              None
              if self.features is None
              else random_subspace(
                  all_features=all_features,
                  k=len(self.features),
                  rng=self.rng,
              )
          )
          # Reset model
          self.model = self.model.clone()
          self.metric = self.metric.clone()
          self.created_on = n_samples_seen
          self.drift_detector = self.drift_detector.clone()
          self.features = subspace
  
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 3 for calling the BaseSRPEstimator obj's underlying member method code with example usage: obj.reset(all_features, n_samples_seen) without return types