Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/13 11:11:45 (11 years ago)
Author:
gkronber
Message:

#1423:

  • removed setting of name and description in LBFGS constructor
  • changed names of placeholder operators in LBFGS
  • added parameter for gradient checking.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsInitializer.cs

    r9211 r9409  
    3838    private const string IterationsParameterName = "Iterations";
    3939    private const string ApproximateGradientsParameterName = "ApproximateGradients";
     40    private const string GradientCheckStepSizeParameterName = "GradientCheckStepSize";
    4041
    4142    #region Parameter Properties
     
    5354    public ILookupParameter<BoolValue> ApproximateGradientsParameter {
    5455      get { return (ILookupParameter<BoolValue>)Parameters[ApproximateGradientsParameterName]; }
     56    }
     57    public ILookupParameter<DoubleValue> GradientStepSizeParameter {
     58      get { return (ILookupParameter<DoubleValue>)Parameters[GradientCheckStepSizeParameterName]; }
    5559    }
    5660
     
    7478      Parameters.Add(new LookupParameter<BoolValue>(ApproximateGradientsParameterName,
    7579                                                    "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)."));
    7681      // out
    7782      Parameters.Add(new LookupParameter<LbfgsState>(StateParameterName, "The state of the LM-BFGS algorithm."));
     
    9398      alglib.minlbfgs.minlbfgssetcond(state, 0.0, 0, 0, Iterations.Value);
    9499      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);
    96102
    97103      PointParameter.ActualValue = new RealVector(initialPoint);
Note: See TracChangeset for help on using the changeset viewer.