LeastSquaresMetaModelSelection¶
- class LeastSquaresMetaModelSelection(*args)¶
Least squares metamodel selection factory.
Adaptative sparse selection, as proposed in [blatman2009].
Methods
Accessor to the basis sequence factory.
Accessor to the object's name.
Accessor to the coefficients.
Accessor to the fitting algorithm.
getName
()Accessor to the object's name.
getPsi
()Accessor to the basis.
Accessor to the coefficients.
Accessor to the coefficients.
Accessor to the weights.
getX
()Accessor to the input sample.
getY
()Accessor to the output sample.
hasName
()Test if the object is named.
Get the model selection flag.
run
(*args)Run the algorithm.
setBasisSequenceFactory
(basisSequenceFactory)Set the basis sequence factory.
setFittingAlgorithm
(fittingAlgorithm)Set the fitting algorithm.
setName
(name)Accessor to the object's name.
Notes
The LeastSquaresMetaModelSelection is built from a
LeastSquaresMetaModelSelectionFactory
. The stopping criteria for the model selection is defined through the following entries of theResourceMap
:- LeastSquaresMetaModelSelection-ErrorThreshold: if the error computed by cross validation is lesser than this threshold,
then the exploration is stopped. The default value is 0: this criteria is not activated by default.
- LeastSquaresMetaModelSelection-MaximumError: if the error computed by cross validation is greater than this threshold,
then the exploration is stopped (the error first decreases then increases when the basis complexity increases). The best approximation obtained so far is returned. The default value is 0.5.
- LeastSquaresMetaModelSelection-alpha: through the exploration, the minimum error
is stored. If the
current error is greater than
, then the exploration is stopped. The best approximation obtained so far is returned. The default value is 2. This value allows one to filter little fluctuations in the error computation.
- LeastSquaresMetaModelSelection-alpha: through the exploration, the minimum error
- __init__(*args)¶
- getBasisSequenceFactory()¶
Accessor to the basis sequence factory.
- Returns:
- basisSequenceFactory
BasisSequenceFactory
Basis sequence factory.
- basisSequenceFactory
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getFittingAlgorithm()¶
Accessor to the fitting algorithm.
- Returns:
- fittingAlgorithm
FittingAlgorithm
Fitting algorithm.
- fittingAlgorithm
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getRelativeError()¶
Accessor to the coefficients.
- Returns:
- relativeErrorfloat
The relative error
- getResidual()¶
Accessor to the coefficients.
- Returns:
- coefficientsfloat
The residual
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- involvesModelSelection()¶
Get the model selection flag.
A model selection method can be used to select the coefficients of the decomposition which enable to best predict the output. Model selection can lead to a sparse functional chaos expansion.
- Returns:
- involvesModelSelectionbool
True if the method involves a model selection method.
- run(*args)¶
Run the algorithm.
- setBasisSequenceFactory(basisSequenceFactory)¶
Set the basis sequence factory.
- Parameters:
- basisSequenceFactory
BasisSequenceFactory
Basis sequence factory.
- basisSequenceFactory
- setFittingAlgorithm(fittingAlgorithm)¶
Set the fitting algorithm.
- Parameters:
- fittingAlgorithm
FittingAlgorithm
Fitting algorithm.
- fittingAlgorithm
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.