## Developer Guide and Reference

• 2021.6
• 04/11/2022
• Public Content
Contents

The adaptive subgradient method (AdaGrad) [Duchi2011] follows the algorithmic framework of an iterative solver with the algorithm-specific transformation , set of intrinsic parameters defined for the learning rate , and algorithm-specific vector and power of Lebesgue space defined as follows:  :
1. , where is the -th coordinate of the gradient 2. , where Convergence check: ## Computation

The adaptive subgradient (AdaGrad) method is a special case of an iterative solver. For parameters, input, and output of iterative solvers, see Computation for Iterative Solver.
Algorithm Input
In addition to the input of the iterative solver, the AdaGrad method accepts the following optional input:
OptionalDataID
Input
A numeric table of size with the values of . Each value is an accumulated sum of squares of coordinate values of a corresponding gradient.
Algorithm Parameters
Parameter
Default Value
Description
algorithmFPType
float
The floating-point type that the algorithm uses for intermediate computations. Can be
float
or
double
.
method
defaultDense
Default performance-oriented computation method.
batchIndices
NULL
A numeric table of size for the
defaultDense
method that represents 32-bit integer indices of terms in the objective function. If no indices are provided, the algorithm generates random indices.
batchSize The number of batch indices to compute the stochastic gradient.
If
batchSize
equals the number of terms in the objective function, no random sampling is performed, and all terms are used to calculate the gradient.
The algorithm ignores this parameter if the
batchIndices
parameter is provided.
learningRate
A numeric table of size that contains the default step length equal to .
A numeric table of size that contains the value of learning rate .
This parameter can be an object of any class derived from
NumericTable
, except for
PackedTriangularMatrix
,
PackedSymmetricMatrix
, and
CSRNumericTable
.
degenerateCasesThreshold Value needed to avoid degenerate cases when computing square roots.
engine
SharePtr< engines:: mt19937:: Batch>()
Pointer to the random number generator engine that is used internally for generation of 32-bit integer indices of terms in the objective function.
Algorithm Output
In addition to the output of the iterative solver, the AdaGrad method calculates the following optional result:
OptionalDataID
Output
A numeric table of size with the values of . Each value is an accumulated sum of squares of coordinate values of a corresponding gradient.

## Examples

C++ (CPU)
Java*
There is no support for Java on GPU.
Python*

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.