class_docstr: Optimal learning schedule as proposed by Léon Bottou.
  
  Parameters
  ----------
  loss
  alpha
  
  References
  ----------
  [^1]: [Bottou, L., 2012. Stochastic gradient descent tricks. In Neural networks: Tricks of the trade (pp. 421-436). Springer, Berlin, Heidelberg.](https://cilvr.cs.nyu.edu/diglib/lsml/bottou-sgd-tricks-2012.pdf)
class_docstr_tok: ["Optimal","learning","schedule","as","proposed","by","L\u00e9on","Bottou",".","Parameters","--","--","--","--","--","loss","alpha","References","--","--","--","--","--","[","^1","]",":","[","Bottou",",","L.",",","2012",".","Stochastic","gradient","descent","tricks",".","In","Neural","networks",":","Tricks","of","the","trade","(","pp",".","421-436",")",".","Springer",",","Berlin",",","Heidelberg",".","]","(","https",":","\/\/cilvr.cs.nyu.edu\/diglib\/lsml\/bottou-sgd-tricks-2012.pdf",")"]
code: def __init__(self, loss: optim.losses.Loss, alpha=1e-4):
      self.loss = loss
      self.alpha = alpha
  
      typw = math.sqrt(1.0 / math.sqrt(self.alpha))
      initial_eta0 = typw / max(1.0, self.loss.gradient(True, -typw))
      self.t0 = 1.0 / (initial_eta0 * self.alpha)
  
file_path: river/river/optim/schedulers.py
imports: from __future__ import annotations
  import math
  from river import optim
label_desc: Use image node_id 1 to create a new Optimal object from inherited base classes: optim.base with example: obj = Optimal(loss, alpha)