class_docstr: The Ftrl optimizer.
  
  Referenced from *Ad Click Prediction: a View from the Trenches*, available at
  http://dl.acm.org/citation.cfm?id=2488200.
  
  eta :
      .. math::
         \eta_{t,i} = \frac{learningrate}{\beta+\sqrt{\sum_{s=1}^tg_{s,i}^2}}
  
  The optimizer updates the weight by::
  
      rescaled_grad = clip(grad * rescale_grad, clip_gradient)
      z += rescaled_grad - (sqrt(n + rescaled_grad**2) - sqrt(n)) * weight / learning_rate
      n += rescaled_grad**2
      w = (sign(z) * lamda1 - z) / ((beta + sqrt(n)) / learning_rate + wd) * (abs(z) > lamda1)
  
  If the storage types of weight, state and grad are all ``row_sparse``,     **sparse updates** are applied by::
  
      for row in grad.indices:
          rescaled_grad[row] = clip(grad[row] * rescale_grad, clip_gradient)
          z[row] += rescaled_grad[row] - (sqrt(n[row] + rescaled_grad[row]**2) - sqrt(n[row])) * weight[row] / learning_rate
          n[row] += rescaled_grad[row]**2
          w[row] = (sign(z[row]) * lamda1 - z[row]) / ((beta + sqrt(n[row])) / learning_rate + wd) * (abs(z[row]) > lamda1)
  
  The sparse update only updates the z and n for the weights whose row_sparse
  gradient indices appear in the current batch, rather than updating it for all
  indices. Compared with the original update, it can provide large
  improvements in model training throughput for some applications. However, it
  provides slightly different semantics than the original update, and
  may lead to different empirical results.
  
  For details of the update algorithm, see :class:`~mxnet.ndarray.ftrl_update`.
  
  This optimizer accepts the following parameters in addition to those accepted
  by :class:`.Optimizer`.
  
  Parameters
  ----------
  learning_rate : float, default 0.1
      The initial learning rate. If None, the optimization will use the
      learning rate from ``lr_scheduler``. If not None, it will overwrite
      the learning rate in ``lr_scheduler``. If None and ``lr_scheduler``
      is also None, then it will be set to 0.01 by default.
  lamda1 : float, default 0.01
      L1 regularization coefficient.
  beta : float, default 1.0
      Per-coordinate learning rate correlation parameter.
  use_fused_step : bool, default True
      Whether or not to use fused kernels for optimizer.
      When use_fused_step=False, step is called,
      otherwise, fused_step is called.
code: def __init__(
      self,
      learning_rate=0.1,
      lamda1=0.01,
      beta=1.0,
      use_fused_step=True,
      **kwargs,
  ):
      super(Ftrl, self).__init__(
          learning_rate=learning_rate,
          use_fused_step=use_fused_step,
          **kwargs,
      )
      self.lamda1 = lamda1
      self.beta = beta
  
file_path: mxnet/python/mxnet/optimizer/ftrl.py
imports: from __future__ import absolute_import
  from ..ndarray import zeros, clip, sqrt, square, sign, maximum, abs
  from ..ndarray import ftrl_update
  from .optimizer import Optimizer, register
label_desc: Use image node_id 1 to create a new Ftrl object from inherited base classes: Optimizer with example: obj = Ftrl(learning_rate, lamda1, beta, use_fused_step)