class_docstr: Drift retraining classifier.
  
  This classifier is a wrapper for any classifier. It monitors the incoming data for concept
  drifts and warnings in the model's accurary. In case a warning is detected, a background model
  starts to train. If a drift is detected, the model will be replaced by the background model,
  and the background model will be reset.
  
  Parameters
  ----------
  model
      The classifier and background classifier class.
  drift_detector
      Algorithm to track warnings and concept drifts. Attention! If the parameter train_in_background is True, the drift_detector must have a warning tracker.
  train_in_background
      Parameter to determine if a background model will be used.
  
  Examples
  --------
  
  >>> from river import datasets
  >>> from river import evaluate
  >>> from river import drift
  >>> from river import metrics
  >>> from river import tree
  
  >>> dataset = datasets.Elec2().take(3000)
  
  >>> model = drift.DriftRetrainingClassifier(
  ...     model=tree.HoeffdingTreeClassifier(),
  ...     drift_detector=drift.binary.DDM()
  ... )
  
  >>> metric = metrics.Accuracy()
  
  >>> evaluate.progressive_val_score(dataset, model, metric)
  Accuracy: 86.46%
class_docstr_tok: ["Drift","retraining","classifier",".","This","classifier","is","a","wrapper","for","any","classifier",".","It","monitors","the","incoming","data","for","concept","drifts","and","warnings","in","the","model","'s","accurary",".","In","case","a","warning","is","detected",",","a","background","model","starts","to","train",".","If","a","drift","is","detected",",","the","model","will","be","replaced","by","the","background","model",",","and","the","background","model","will","be","reset",".","Parameters","--","--","--","--","--","model","The","classifier","and","background","classifier","class",".","drift_detector","Algorithm","to","track","warnings","and","concept","drifts",".","Attention","!","If","the","parameter","train_in_background","is","True",",","the","drift_detector","must","have","a","warning","tracker",".","train_in_background","Parameter","to","determine","if","a","background","model","will","be","used",".","Examples","--","--","--","--",">",">",">","from","river","import","datasets",">",">",">","from","river","import","evaluate",">",">",">","from","river","import","drift",">",">",">","from","river","import","metrics",">",">",">","from","river","import","tree",">",">",">","dataset","=","datasets.Elec2","(",")",".take","(","3000",")",">",">",">","model","=","drift.DriftRetrainingClassifier","(","...","model=tree.HoeffdingTreeClassifier","(",")",",","...","drift_detector=drift.binary.DDM","(",")","...",")",">",">",">","metric","=","metrics.Accuracy","(",")",">",">",">","evaluate.progressive_val_score","(","dataset",",","model",",","metric",")","Accuracy",":","86.46","%"]
code: def learn_one(self, x, y, **kwargs):
      self._update_detector(x, y)
      self.model.learn_one(x, y, **kwargs)
  
file_path: river/river/drift/retrain.py
imports: from __future__ import annotations
  from river import base, drift
label_desc: Use image node_id 4 for calling the DriftRetrainingClassifier obj's underlying member method code with example usage: obj.learn_one(x, y) without return types