DFPOptimizerOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.Models.Options
Configuration options for the Davidon-Fletcher-Powell (DFP) optimization algorithm, which is a quasi-Newton method used for finding local minima of functions.
Inheritance: ModelOptions → OptimizationAlgorithmOptions<T, TInput, TOutput> → GradientBasedOptimizerOptions<T, TInput, TOutput> → DFPOptimizerOptions<T, TInput, TOutput>
For Beginners
Think of the DFP optimizer as a smart navigation system for your AI model. While basic optimizers (like gradient descent) only look at the current slope to decide where to go next, DFP remembers information about previous steps to make better decisions. It’s like the difference between a hiker who only looks at the steepness right in front of them versus one who uses a map and compass to plan a more efficient route to the top of the mountain. This typically means your model can learn faster and more accurately, especially for complex problems.
How It Works
The DFP algorithm is a second-order optimization method that approximates the inverse Hessian matrix to accelerate convergence compared to first-order methods like gradient descent. It’s particularly effective for optimizing functions with complex curvature.
Constructors
| Constructor | Summary |
|---|---|
DFPOptimizerOptions() |
Initializes a new instance of the DFPOptimizerOptions class with appropriate defaults. |
Properties
| Property | Summary |
|---|---|
bool UseLineSearch { get; set; } |
Gets or sets whether a training step backtracks along its DFP step when the full step does not lower the loss. |
double AdaptationRate { get; set; } |
Gets or sets the rate at which the algorithm adapts its approximation of the inverse Hessian matrix. |
double InitialLearningRate { get; set; } |
Gets or sets the initial learning rate for the optimization process. |
double LearningRateDecreaseFactor { get; set; } |
Gets or sets the factor by which the learning rate decreases when progress stalls or reverses. |
double LearningRateIncreaseFactor { get; set; } |
Gets or sets the factor by which the learning rate increases when progress is being made. |
double MaxLearningRate { get; set; } |
Gets or sets the maximum allowed learning rate during optimization. |
double MinLearningRate { get; set; } |
Gets or sets the minimum allowed learning rate during optimization. |
int BatchSize { get; set; } |
Gets or sets the batch size for gradient computation. |
int MaxLineSearchIterations { get; set; } |
Gets or sets the maximum number of iterations the optimizer will perform. |