class_docstr: Base class to implement optimization objectives used in Stochastic Gradient Trees.
class_docstr_tok: ["Base","class","to","implement","optimization","objectives","used","in","Stochastic","Gradient","Trees","."]
docstr: Return the gradient and hessian data concerning one instance and its prediction.
  
  Parameters
  ----------
  y_true
      Target value.
  y_pred
      Predicted target value.
docstr_tok: ["Return","the","gradient","and","hessian","data","concerning","one","instance","and","its","prediction",".","Parameters","--","--","--","--","--","y_true","Target","value",".","y_pred","Predicted","target","value","."]
code: def compute_derivatives(
      self, y_true: float, y_pred: float
  ) -> GradHess:
      """Return the gradient and hessian data concerning one instance and its prediction.
  
      Parameters
      ----------
      y_true
          Target value.
      y_pred
          Predicted target value.
      """
      raise NotImplementedError
  
file_path: river/river/tree/losses.py
imports: from __future__ import annotations
  import abc
  import math
  from .utils import GradHess
label_desc: Use image node_id 1 for calling the Loss obj's underlying member method code with example usage: obj.compute_derivatives(y_true, y_pred) without return types