Beispiel #1
0
func NewLbfgs() *Lbfgs {
	l := &Lbfgs{
		//step: &uni.Step{},

		LinesearchMethod:   univariate.NewCubic(),
		LinesearchSettings: univariate.DefaultGradSettings,
		NumStore:           30,
		Wolfe:              &linesearch.StrongWolfeConditions{FunConst: 0, GradConst: 0.9},
	}
	l.LinesearchSettings.MaximumFunctionEvaluations = 100
	l.LinesearchSettings.Display = false
	l.LinesearchSettings.Gradient.AbsoluteTolerance = 0 // Force convergence from wolfe conditions
	return l
}
Beispiel #2
0
func NewLbfgs() *Lbfgs {
	l := &Lbfgs{
		step: uni.NewBoundedStep(),

		LinesearchMethod:   univariate.NewCubic(),
		LinesearchSettings: univariate.NewUniGradSettings(),
		NumStore:           30,
		Wolfe:              &linesearch.StrongWolfeConditions{},
	}
	l.Wolfe.SetFunConst(0)
	l.Wolfe.SetGradConst(0.9)
	l.LinesearchSettings.MaximumFunctionEvaluations = 100
	l.LinesearchSettings.Display = false
	l.LinesearchSettings.GradientAbsoluteTolerance = 0 // Force convergence from wolfe conditions
	return l
}