public static class StochasticGradientDescent.StochasticGradientDescentBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
StochasticGradientDescent.StochasticGradientDescentBuilder |
breakOnDifference(double delta)
Breaks minimization process when the given delta in costs have been
archieved.
|
StochasticGradientDescent |
build() |
static StochasticGradientDescent.StochasticGradientDescentBuilder |
create(double alpha)
Creates a new builder.
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
enableAdaptiveLearningRate()
Enables adaptive learning rate, using the algorithm:
alpha = 1d / (initialAlpha * (allIterations + 2)); where allIterations is a counter over all passes. |
StochasticGradientDescent.StochasticGradientDescentBuilder |
historySize(int historySize)
Sets the size of the history to keep to compute average improvements and
output progress information.
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
holdoutValidationPercentage(double perc)
Holdout validation percentage, this will take a subset of the data on the
stream and do a validation on it.
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
lambda(double lambda)
Sets the regularization parameter "lambda".
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
momentum(double momentum)
Add momentum to this gradient descent minimizer.
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
progressReportInterval(int interval)
Sets the progress report interval.
|
StochasticGradientDescent.StochasticGradientDescentBuilder |
weightUpdater(WeightUpdater weightUpdater)
Sets the weight updater, for example to use regularization.
|
public StochasticGradientDescent build()
public StochasticGradientDescent.StochasticGradientDescentBuilder momentum(double momentum)
momentum - the momentum to use. Between 0 and 1.public StochasticGradientDescent.StochasticGradientDescentBuilder holdoutValidationPercentage(double perc)
perc - the percentage to use. Between 0 and 1.public StochasticGradientDescent.StochasticGradientDescentBuilder weightUpdater(WeightUpdater weightUpdater)
lambda(double)
method.weightUpdater - the updater to use.public StochasticGradientDescent.StochasticGradientDescentBuilder lambda(double lambda)
lambda - the amount to regularize with.public StochasticGradientDescent.StochasticGradientDescentBuilder historySize(int historySize)
public StochasticGradientDescent.StochasticGradientDescentBuilder progressReportInterval(int interval)
interval - the interval. E.g. every 10th iteration.public StochasticGradientDescent.StochasticGradientDescentBuilder breakOnDifference(double delta)
delta - the delta to break in difference between two costs.public StochasticGradientDescent.StochasticGradientDescentBuilder enableAdaptiveLearningRate()
alpha = 1d / (initialAlpha * (allIterations + 2));where allIterations is a counter over all passes.
public static StochasticGradientDescent.StochasticGradientDescentBuilder create(double alpha)
alpha - the learning rate to set.Copyright © 2015. All rights reserved.