Unfit  3.1.1
Data fitting and optimization software
Public Member Functions | List of all members
Unfit::Examples::Woods Class Reference

Implements the Woods test function. More...

#include <Woods.hpp>

Inheritance diagram for Unfit::Examples::Woods:
Unfit::GenericCostFunction

Public Member Functions

std::vector< double > operator() (const std::vector< double > &param)
 
- Public Member Functions inherited from Unfit::GenericCostFunction
virtual ~GenericCostFunction ()
 

Detailed Description

Implements the Woods test function.

Here the goal is to find a parameter set that minimises the Woods test function (four dimensions). This function is defined as:

residuals[0] = 10.0*(B - A*A); residuals[1] = 1.0 - A; residuals[2] = sqrt(90.0)*(D - C*C); residuals[3] = 1.0 - C; residuals[4] = sqrt(10.0)*(B + D - 2.0); residuals[5] = (B - D) / sqrt(10.0);

The goal is to find the values of A, B, C & D that give a minimum cost. In terms of the model, A = param[0], B = param[1], C = param[2], and D = param[3].

Member Function Documentation

◆ operator()()

std::vector<double> Unfit::Examples::Woods::operator() ( const std::vector< double > &  param)
inlinevirtual

Calculate the residuals for the Woods function.

Intended use : residuals = cost_func(param)

Parameters
paramA vector containing the current estimates of the parameters
Returns
A vector containing the residuals

Implements Unfit::GenericCostFunction.


The documentation for this class was generated from the following file: