neldermead - ActiveState ActiveGo 1.8
...

Package neldermead

import "github.com/influxdata/influxdb/influxql/neldermead"
Overview
Index

Overview ▾

Package neldermead is an implementation of the Nelder-Mead optimization method. Based on work by Michael F. Hutt: http://www.mikehutt.com/neldermead.html

type Optimizer

Optimizer represents the parameters to the Nelder-Mead simplex method.

type Optimizer struct {
    // Maximum number of iterations.
    MaxIterations int
    // Reflection coefficient.
    Alpha,

    Beta,

    Gamma float64
}

func New

func New() *Optimizer

New returns a new instance of Optimizer with all values set to the defaults.

func (*Optimizer) Optimize

func (o *Optimizer) Optimize(
    objfunc func([]float64) float64,
    start []float64,
    epsilon,
    scale float64,
) (float64, []float64)

Optimize applies the Nelder-Mead simplex method with the Optimizer's settings.