class_docstr: Learning Node for regression tasks that dynamically selects between predictors and
      might behave as a regression tree node or a model tree node, depending on which predictor
      is the best one.
  
  Parameters
  ----------
  stats
      In regression tasks the node keeps an instance of `river.stats.Var` to estimate
      the target's statistics.
  depth
      The depth of the node.
  splitter
      The numeric attribute observer algorithm used to monitor target statistics
      and perform split attempts.
  leaf_model
      A `river.base.Regressor` instance used to learn from instances and provide
      responses.
  kwargs
      Other parameters passed to the learning node.
class_docstr_tok: ["Learning","Node","for","regression","tasks","that","dynamically","selects","between","predictors","and","might","behave","as","a","regression","tree","node","or","a","model","tree","node",",","depending","on","which","predictor","is","the","best","one",".","Parameters","--","--","--","--","--","stats","In","regression","tasks","the","node","keeps","an","instance","of","`","river.stats.Var","`","to","estimate","the","target","'s","statistics",".","depth","The","depth","of","the","node",".","splitter","The","numeric","attribute","observer","algorithm","used","to","monitor","target","statistics","and","perform","split","attempts",".","leaf_model","A","`","river.base.Regressor","`","instance","used","to","learn","from","instances","and","provide","responses",".","kwargs","Other","parameters","passed","to","the","learning","node","."]
code: def learn_one(self, x, y, *, w=1.0, tree=None):
      pred_mean = self.stats.mean.get()
      pred_model = self._leaf_model.predict_one(x)
  
      self._fmse_mean = (
          tree.model_selector_decay * self._fmse_mean
          + (y - pred_mean) ** 2
      )
      self._fmse_model = (
          tree.model_selector_decay * self._fmse_model
          + (y - pred_model) ** 2
      )
  
      super().learn_one(x, y, w=w, tree=tree)
  
imports: from __future__ import annotations
  import inspect
  from river.stats import Var
  from ..splitter import EBSTSplitter
  from ..splitter.nominal_splitter_reg import NominalSplitterReg
  from .leaf import HTLeaf
label_desc: Use image node_id 2 for calling the LeafAdaptive obj's underlying member method code with example usage: obj.learn_one(x, y) without return types