new LBFGS(gradient, updater)
Class used to solve an optimization problem using Limited-memory BFGS.
Reference: http://en.wikipedia.org/wiki/Limited-memory_BFGS param: gradient
Gradient function to be used. param: updater Updater to be used to update weights after every iteration.
Parameters:
Name | Type | Description |
---|---|---|
gradient |
Gradient | |
updater |
Updater |
- Source:
Methods
(static) runLBFGS(data, gradient, updater, numCorrections, convergenceTol, maxNumIterations, regParam, initialWeights) → {module:eclairjs.Tuple}
Run Limited-memory BFGS (L-BFGS) in parallel. Averaging the subgradients over different partitions is performed
using one standard spark map-reduce in each iteration.
Parameters:
Name | Type | Description |
---|---|---|
data |
module:eclairjs/rdd.RDD | - Input data for L-BFGS. RDD of the set of data examples, each of the form (label, [feature values]). |
gradient |
Gradient | - Gradient object (used to compute the gradient of the loss function of one single data example) |
updater |
Updater | - Updater function to actually perform a gradient step in a given direction. |
numCorrections |
integer | - The number of corrections used in the L-BFGS update. |
convergenceTol |
float | - The convergence tolerance of iterations for L-BFGS which is must be nonnegative. Lower values are less tolerant and therefore generally cause more iterations to be run. |
maxNumIterations |
integer | - Maximal number of iterations that L-BFGS can be run. |
regParam |
float | - Regularization parameter |
initialWeights |
module:eclairjs/mllib/linalg.Vector | (undocumented) |
- Source:
Returns:
A tuple containing two elements. The first element is a column matrix containing weights for every feature,
and the second element is an array containing the loss computed for every iteration.