C# Class SwarmOps.Problems.CurveFitting

Base-class for curvefitting by minimizing the Mean-Squared-Error (MSE), that is, minimizing Sum((y - f(x))^2), for all given data-pairs (x,y).
Inheritance: Problem
Show file Open project: DanWBR/dwsim3

Public Methods

Method Description
ComputeY ( double parameters, double x ) : double

Compute the value y given x using the curve-fitting function.

ComputeY ( double parameters, double x ) : double[]

Compute the fitted curve.

CurveFitting ( double x, double y )

Create the object.

Fitness ( double parameters ) : double

Compute and return fitness for the given parameters.

Method Details

ComputeY() public abstract method

Compute the value y given x using the curve-fitting function.
public abstract ComputeY ( double parameters, double x ) : double
parameters double Parameters for curve-fitting function.
x double X-axis value.
return double

ComputeY() public method

Compute the fitted curve.
public ComputeY ( double parameters, double x ) : double[]
parameters double Parameters to use for the curve-function.
x double X-axis values to map to Y-axis values for the fitted curve.
return double[]

CurveFitting() public method

Create the object.
public CurveFitting ( double x, double y )
x double X-axis values.
y double Y-axis values, curve to be fitted.

Fitness() public method

Compute and return fitness for the given parameters.
public Fitness ( double parameters ) : double
parameters double Candidate solution.
return double