class_docstr: Huber loss, for regression.
  
  Domain:
  y_true and y_pred all real numbers
  quantile in (0, 1)
  
  Link:
  y_pred = raw_prediction
  
  For a given sample x_i, the Huber loss is defined as::
  
      loss(x_i) = 1/2 * abserr**2            if abserr <= delta
                  delta * (abserr - delta/2) if abserr > delta
  
      abserr = |y_true_i - raw_prediction_i|
      delta = quantile(abserr, self.quantile)
  
  Note: HuberLoss(quantile=1) equals HalfSquaredError and HuberLoss(quantile=0)
  equals delta * (AbsoluteError() - delta/2).
  
  Additional Attributes
  ---------------------
  quantile : float
      The quantile level which defines the breaking point `delta` to distinguish
      between absolute error and squared error. Must be in range (0, 1).
  
   Reference
  ---------
  .. [1] Friedman, J.H. (2001). :doi:`Greedy function approximation: A gradient
    boosting machine <10.1214/aos/1013203451>`.
    Annals of Statistics, 29, 1189-1232.
class_docstr_tok: ["Huber","loss",",","for","regression",".","Domain",":","y_true","and","y_pred","all","real","numbers","quantile","in","(","0",",","1",")","Link",":","y_pred","=","raw_prediction","For","a","given","sample","x_i",",","the","Huber","loss","is","defined","as",":",":","loss","(","x_i",")","=","1\/2","*","abserr","*","*","2","if","abserr","<","=","delta","delta","*","(","abserr","-","delta\/2",")","if","abserr",">","delta","abserr","=","|y_true_i","-","raw_prediction_i|","delta","=","quantile","(","abserr",",","self.quantile",")","Note",":","HuberLoss","(","quantile=1",")","equals","HalfSquaredError","and","HuberLoss","(","quantile=0",")","equals","delta","*","(","AbsoluteError","(",")","-","delta\/2",")",".","Additional","Attributes","--","--","--","--","--","--","--","--","--","--","-","quantile",":","float","The","quantile","level","which","defines","the","breaking","point","`","delta","`","to","distinguish","between","absolute","error","and","squared","error",".","Must","be","in","range","(","0",",","1",")",".","Reference","--","--","--","--","-","..","[","1","]","Friedman",",","J.H",".","(","2001",")",".",":","doi",":","`","Greedy","function","approximation",":","A","gradient","boosting","machine","<","10.1214\/aos\/1013203451",">","`",".","Annals","of","Statistics",",","29",",","1189-1232","."]
code: def __init__(self, sample_weight=None, quantile=0.9, delta=0.5):
      check_scalar(
          quantile,
          "quantile",
          target_type=numbers.Real,
          min_val=0,
          max_val=1,
          include_boundaries="neither",
      )
      self.quantile = (
          quantile  # This is better stored outside of Cython.
      )
      super().__init__(
          closs=CyHuberLoss(delta=float(delta)),
          link=IdentityLink(),
      )
      self.approx_hessian = True
      self.constant_hessian = False
  
imports: import numbers
  import numpy
  from scipy.special import xlogy
  from ..utils import check_scalar
  from ..utils.stats import _weighted_percentile
  from ._loss import CyAbsoluteError, CyExponentialLoss, CyHalfBinomialLoss, CyHalfGammaLoss, CyHalfMultinomialLoss, CyHalfPoissonLoss, CyHalfSquaredError, CyHalfTweedieLoss, CyHalfTweedieLossIdentity, CyHuberLoss, CyPinballLoss
  from .link import HalfLogitLink, IdentityLink, Interval, LogitLink, LogLink, MultinomialLogit
label_desc: Use image node_id 1 to create a new HuberLoss object from inherited base classes: BaseLoss with example: obj = HuberLoss(sample_weight, quantile, delta)