class_docstr: Absolute error with identity link, for regression.
  
  Domain:
  y_true and y_pred all real numbers
  
  Link:
  y_pred = raw_prediction
  
  For a given sample x_i, the absolute error is defined as::
  
      loss(x_i) = |y_true_i - raw_prediction_i|
  
  Note that the exact hessian = 0 almost everywhere (except at one point, therefore
  differentiable = False). Optimization routines like in HGBT, however, need a
  hessian > 0. Therefore, we assign 1.
class_docstr_tok: ["Absolute","error","with","identity","link",",","for","regression",".","Domain",":","y_true","and","y_pred","all","real","numbers","Link",":","y_pred","=","raw_prediction","For","a","given","sample","x_i",",","the","absolute","error","is","defined","as",":",":","loss","(","x_i",")","=","|y_true_i","-","raw_prediction_i|","Note","that","the","exact","hessian","=","0","almost","everywhere","(","except","at","one","point",",","therefore","differentiable","=","False",")",".","Optimization","routines","like","in","HGBT",",","however",",","need","a","hessian",">","0",".","Therefore",",","we","assign","1","."]
code: def __init__(self, sample_weight=None):
      super().__init__(closs=CyAbsoluteError(), link=IdentityLink())
      self.approx_hessian = True
      self.constant_hessian = sample_weight is None
  
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 AbsoluteError object from inherited base classes: BaseLoss with example: obj = AbsoluteError(sample_weight)