Package methods
Class FastGradientDescentMethod
java.lang.Object
methods.AbstractGradientMethod
methods.FastGradientDescentMethod
- All Implemented Interfaces:
Method
public class FastGradientDescentMethod extends AbstractGradientMethod
Class of Fast Gradient realisation
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FastGradientDescentMethod(double epsilon)Standard constructorFastGradientDescentMethod(double epsilon, boolean log, java.lang.String fileName)Full constructor -
Method Summary
Modifier and Type Method Description private doublecalculateStep(double[] x, double[] gradient, Function function)function for computing of the step.double[]findMinimum(Function function, double[] x0)search minimum of the function with start from the point in x_0
-
Constructor Details
-
FastGradientDescentMethod
public FastGradientDescentMethod(double epsilon)Standard constructor- Parameters:
epsilon-AbstractGradientMethod.epsilon- See Also:
AbstractGradientMethod(double)
-
FastGradientDescentMethod
public FastGradientDescentMethod(double epsilon, boolean log, java.lang.String fileName) throws java.io.FileNotFoundExceptionFull constructor- Parameters:
epsilon-AbstractGradientMethod.epsilonlog-AbstractGradientMethod.logfileName- output file forAbstractGradientMethod.out- Throws:
java.io.FileNotFoundException- if specified output file was not found- See Also:
AbstractGradientMethod(double, boolean, String)
-
-
Method Details
-
findMinimum
Description copied from interface:Methodsearch minimum of the function with start from the point in x_0- Parameters:
function- explores functionx0- point for the start of exploring- Returns:
- minimum of the function
- Throws:
java.io.IOException- exception when log from function computing throw exception
-
calculateStep
function for computing of the step.- Parameters:
x- start pointgradient- gradient of the fucntionfunction- explored function- Returns:
- step for
findMinimum(Function, double[])
-