GradientDescent Class |
Namespace: Accord.Math.Optimization
public class GradientDescent : BaseGradientOptimizationMethod, IGradientOptimizationMethod, IOptimizationMethod, IOptimizationMethod<double[], double>, IGradientOptimizationMethod<double[], double>, IFunctionOptimizationMethod<double[], double>
The GradientDescent type exposes the following members.
Name | Description | |
---|---|---|
GradientDescent |
Creates a new instance of the GD optimization algorithm.
|
Name | Description | |
---|---|---|
Function |
Gets or sets the function to be optimized.
(Inherited from BaseOptimizationMethod.) | |
Gradient |
Gets or sets a function returning the gradient
vector of the function to be optimized for a
given value of its free parameters.
(Inherited from BaseGradientOptimizationMethod.) | |
Iterations |
Gets or sets the maximum number of iterations
performed by the learning algorithm. Default is 0.
| |
LearningRate |
Gets or sets the learning rate. Default is 1e-3.
| |
NumberOfVariables |
Gets the number of variables (free parameters)
in the optimization problem.
(Inherited from BaseOptimizationMethod.) | |
Solution |
Gets the current solution found, the values of
the parameters which optimizes the function.
(Inherited from BaseOptimizationMethod.) | |
Token |
Gets or sets a cancellation token that can be used to
stop the learning algorithm while it is running.
(Inherited from BaseOptimizationMethod.) | |
Tolerance |
Gets or sets the maximum change in the average log-likelihood
after an iteration of the algorithm used to detect convergence.
Default is 1e-5.
| |
Value |
Gets the output of the function at the current Solution.
(Inherited from BaseOptimizationMethod.) |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Maximize |
Finds the maximum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseGradientOptimizationMethod.) | |
Maximize(Double) |
Finds the maximum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseOptimizationMethod.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Minimize |
Finds the minimum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseGradientOptimizationMethod.) | |
Minimize(Double) |
Finds the minimum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseOptimizationMethod.) | |
OnNumberOfVariablesChanged |
Called when the NumberOfVariables property has changed.
(Inherited from BaseOptimizationMethod.) | |
OnProgressChanged |
Raises the [E:ProgressChanged] event.
| |
Optimize |
Implements the actual optimization algorithm. This
method should try to minimize the objective function.
(Overrides BaseOptimizationMethodOptimize.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
ProgressChanged |
Occurs when the current learning progress has changed.
|
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |