FittingAlgorithm

class FittingAlgorithm(*args)

Fitting algorithm.

Available constructors:

FittingAlgorithm(fittingAlgoImp)

Parameters:
fittingAlgoImpa FittingAlgorithmImplementation

A fitting algorithm implementation which is the CorrectedLeaveOneOut or KFold.

Methods

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

getImplementation()

Accessor to the underlying implementation.

getName()

Accessor to the object's name.

run(*args)

Run the algorithm.

setName(name)

Accessor to the object's name.

Notes

FittingAlgorithm is the interface of the FittingAlgorithmImplementation. This class is not usable because it has sense only within the FunctionalChaosAlgorithm.

__init__(*args)
getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getImplementation()

Accessor to the underlying implementation.

Returns:
implImplementation

A copy of the underlying implementation object.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

run(*args)

Run the algorithm.

Usage:

run(x, y, weight, psi, indices)

run(x, y, psi, indices)

run(y, weight, indices, proxy)

run(y, indices, indices)

run(method, y*)

With the first and second usages, we build the design proxy and apply the corresponding run. With the third and fourth usages, we build a least square method with the proxy and right hand size. With the fifth usage, we apply the fitting algorithm using an already defined least squares method.

Parameters:
x2-d sequence of float

Input sample

y2-d sequence of float

Output sample

weightsequence of float

Weights associated to the outputs

psisequence of Function

Basis

indicessequence of int

Indices of the basis

proxyDesignProxy

The design proxy

methodLeastSquaresMethod

Least square method (QR, SVD or Cholesky)

Returns:
measurefloat

Fitting measure

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.