- Timestamp:
- 04/30/13 11:11:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsInitializer.cs
r9211 r9409 38 38 private const string IterationsParameterName = "Iterations"; 39 39 private const string ApproximateGradientsParameterName = "ApproximateGradients"; 40 private const string GradientCheckStepSizeParameterName = "GradientCheckStepSize"; 40 41 41 42 #region Parameter Properties … … 53 54 public ILookupParameter<BoolValue> ApproximateGradientsParameter { 54 55 get { return (ILookupParameter<BoolValue>)Parameters[ApproximateGradientsParameterName]; } 56 } 57 public ILookupParameter<DoubleValue> GradientStepSizeParameter { 58 get { return (ILookupParameter<DoubleValue>)Parameters[GradientCheckStepSizeParameterName]; } 55 59 } 56 60 … … 74 78 Parameters.Add(new LookupParameter<BoolValue>(ApproximateGradientsParameterName, 75 79 "Flag that indicates if gradients should be approximated.")); 80 Parameters.Add(new LookupParameter<DoubleValue>(GradientCheckStepSizeParameterName, "Step size for the gradient check (should be used for debugging the gradient calculation only).")); 76 81 // out 77 82 Parameters.Add(new LookupParameter<LbfgsState>(StateParameterName, "The state of the LM-BFGS algorithm.")); … … 93 98 alglib.minlbfgs.minlbfgssetcond(state, 0.0, 0, 0, Iterations.Value); 94 99 alglib.minlbfgs.minlbfgssetxrep(state, true); 95 // alglib.minlbfgs.minlbfgssetgradientcheck(state, 0.000001); 100 if (GradientStepSizeParameter.ActualValue != null && GradientStepSizeParameter.ActualValue.Value > 0) 101 alglib.minlbfgs.minlbfgssetgradientcheck(state, GradientStepSizeParameter.ActualValue.Value); 96 102 97 103 PointParameter.ActualValue = new RealVector(initialPoint);
Note: See TracChangeset
for help on using the changeset viewer.