public final class GradientDescent extends AbstractMinimizer
GradientDescent.GradientDescentBuilder.| Modifier and Type | Class and Description |
|---|---|
static class |
GradientDescent.GradientDescentBuilder |
| Constructor and Description |
|---|
GradientDescent(double alpha,
double limit) |
| Modifier and Type | Method and Description |
|---|---|
de.jungblut.math.DoubleVector |
minimize(CostFunction f,
de.jungblut.math.DoubleVector pInput,
int maxIterations,
boolean verbose)
Minimizes the given costfunction with the starting parameter theta.
|
static de.jungblut.math.DoubleVector |
minimizeFunction(CostFunction f,
de.jungblut.math.DoubleVector pInput,
double alpha,
double limit,
int length,
boolean verbose)
Minimize a given cost function f with the initial parameters pInput (also
called theta) with a learning rate alpha and a fixed number of iterations.
|
addIterationCompletionCallback, onIterationFinishedpublic GradientDescent(double alpha,
double limit)
alpha - the learning rate.limit - the delta in cost to archieve to break the iterations.public final de.jungblut.math.DoubleVector minimize(CostFunction f, de.jungblut.math.DoubleVector pInput, int maxIterations, boolean verbose)
Minimizerf - the costfunction to minimize.pInput - the starting parameters.maxIterations - the number of iterations to do.verbose - if TRUE it will print progress.public static de.jungblut.math.DoubleVector minimizeFunction(CostFunction f, de.jungblut.math.DoubleVector pInput, double alpha, double limit, int length, boolean verbose)
f - the function to minimize.pInput - the starting parameters.alpha - the learning rate.limit - the cost to archieve to break the iterations.length - the number of iterations.verbose - if true prints progress to STDOUT.Copyright © 2016. All rights reserved.