class_docstr: FTRL-Proximal optimizer.
  
  Parameters
  ----------
  alpha
  beta
  l1
  l2
  
  Attributes
  ----------
  z : collections.defaultdict
  n : collections.defaultdict
  
  Examples
  --------
  
  >>> from river import datasets
  >>> from river import evaluate
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import optim
  >>> from river import preprocessing
  
  >>> dataset = datasets.Phishing()
  >>> optimizer = optim.FTRLProximal()
  >>> model = (
  ...     preprocessing.StandardScaler() |
  ...     linear_model.LogisticRegression(optimizer)
  ... )
  >>> metric = metrics.F1()
  
  >>> evaluate.progressive_val_score(dataset, model, metric)
  F1: 87.56%
  
  References
  ----------
  [^1]: [McMahan, H.B., Holt, G., Sculley, D., Young, M., Ebner, D., Grady, J., Nie, L., Phillips, T., Davydov, E., Golovin, D. and Chikkerur, S., 2013, August. Ad click prediction: a view from the trenches. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining (pp. 1222-1230)](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41159.pdf)
  [^2]: [Tensorflow's `FtrlOptimizer`](https://www.tensorflow.org/api_docs/python/tf/train/FtrlOptimizer)
code: def __init__(self, alpha=0.05, beta=1.0, l1=0.0, l2=1.0):
      self.alpha = alpha
      self.beta = beta
      self.l1 = l1
      self.l2 = l2
      self.z = collections.defaultdict(float)
      self.n = collections.defaultdict(float)
      self.n_iterations = 0
  
file_path: river/river/optim/ftrl.py
imports: from __future__ import annotations
  import collections
  import numpy
  from river import optim
label_desc: Use image node_id 1 to create a new FTRLProximal object from inherited base classes: optim.base with example: obj = FTRLProximal(alpha, beta, l1, l2)