Function fitSimplex

  • fitSimplex(target: TargetFn<number[]>, location: number[], control?: Partial<SimplexControlParam>, maxIterations?: number): { converged: boolean; data: any; evaluations: number; iterations: number; location: number[]; value: number }
  • Run the Simplex algorithm on a target function. This is a convenience function and offers little control but a compact interface. For more control, use Simplex directly.

    Returns

    See Simplex.result for details

    Parameters

    • target: TargetFn<number[]>

      The function to be minimised

    • location: number[]

      The initial location to start the search from

    • control: Partial<SimplexControlParam> = {}

      Control parameters, as an object

    • maxIterations: number = 200

      The maximum number of iterations, per dimension, of the algorithm (calls to Simplex.step()) to take. For example, if you pass maxIterations of 200 and are solving a problem where location.length is 5, you'll take a maximum of 1000 steps in total. If we converge before hitting this number we will return early.

    Returns { converged: boolean; data: any; evaluations: number; iterations: number; location: number[]; value: number }

    • converged: boolean

      Has the algorithm converged?

    • data: any

      Any additional data returned by the target function, for this point

    • evaluations: number

      The number of times that target has been called so far

    • iterations: number

      The number of times that step has been called so far

    • location: number[]

      The best found location

    • value: number

      The value of target(location)

Generated using TypeDoc