docstr: Compute the loss of the node.
  
  Parameters
  ----------
  sample_value
      A given value.
docstr_tok: ["Compute","the","loss","of","the","node",".","Parameters","--","--","--","--","--","sample_value","A","given","value","."]
code: def loss(self, sample_value: base.typing.RegTarget) -> float:
      """Compute the loss of the node.
  
      Parameters
      ----------
      sample_value
          A given value.
  
      """
  
      r = self.predict() - sample_value  # type: ignore
      return r * r / 2
  
imports: from __future__ import annotations
  import collections
  import math
  from river import base, stats
  from river.tree.base import Branch, Leaf
  from river.utils.math import log_sum_2_exp
label_desc: Use image node_id 4 for calling the MondrianNodeRegressor obj's underlying member method code with example usage: obj.loss(sample_value) and returns: unknown