class_docstr: Quantile loss.
  
  Parameters
  ----------
  alpha
      Desired quantile to attain.
  
  Examples
  --------
  
  >>> from river import optim
  
  >>> loss = optim.losses.Quantile(0.5)
  >>> loss(1, 3)
  1.0
  
  >>> loss.gradient(1, 3)
  0.5
  
  >>> loss.gradient(3, 1)
  -0.5
  
  References
  ----------
  [^1]: [Wikipedia article on quantile regression](https://www.wikiwand.com/en/Quantile_regression)
  [^2]: [Derivative from WolframAlpha](https://www.wolframalpha.com/input/?i=derivative+(y+-+p)+*+(alpha+-+Boole(y+-+p))+wrt+p)
class_docstr_tok: ["Quantile","loss",".","Parameters","--","--","--","--","--","alpha","Desired","quantile","to","attain",".","Examples","--","--","--","--",">",">",">","from","river","import","optim",">",">",">","loss","=","optim.losses.Quantile","(","0.5",")",">",">",">","loss","(","1",",","3",")","1.0",">",">",">","loss.gradient","(","1",",","3",")","0.5",">",">",">","loss.gradient","(","3",",","1",")","-0.5","References","--","--","--","--","--","[","^1","]",":","[","Wikipedia","article","on","quantile","regression","]","(","https",":","\/\/www.wikiwand.com\/en\/Quantile_regression",")","[","^2","]",":","[","Derivative","from","WolframAlpha","]","(","https",":","\/\/www.wolframalpha.com\/input\/","?","i=derivative+","(","y+-+p",")","+","*","+","(","alpha+-+Boole","(","y+-+p",")",")","+wrt+p",")"]
code: def __call__(self, y_true, y_pred):
      diff = y_pred - y_true
      return (self.alpha - (diff < 0)) * diff
  
imports: from __future__ import annotations
  import math
  import numpy
  from scipy import special
  from river import base, utils
  from river.optim.base import Loss
label_desc: Use image node_id 2 for calling the Quantile obj's underlying member method code with example usage: obj.__call__(y_true, y_pred) and returns: unknown