LeastSquaresMetaModelSelectionFactory

class LeastSquaresMetaModelSelectionFactory(*args)

Least squares metamodel selection factory.

Parameters:
basisSeqFacBasisSequenceFactory

A basis sequence factory.

fittingAlgoFittingAlgorithm, optional

A fitting algorithm.

Methods

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

Build the approximation.

getBasisSequenceFactory()

Accessor to the basis sequence factory.

getClassName()

Accessor to the object's name.

getFittingAlgorithm()

Accessor to the fitting algorithm.

getName()

Accessor to the object's name.

hasName()

Test if the object is named.

involvesModelSelection()

Get the model selection flag.

setName(name)

Accessor to the object's name.

Notes

Implementation of an approximation algorithm implementation factory which builds an ApproximationAlgorithm.

This class is not usable because it is operational only within the FunctionalChaosAlgorithm.

Examples

>>> import openturns as ot
>>> basisSequenceFactory = ot.LARS()
>>> fittingAlgorithm = ot.CorrectedLeaveOneOut()
>>> approximationAlgorithm = ot.LeastSquaresMetaModelSelectionFactory(
...                                     basisSequenceFactory, fittingAlgorithm)
__init__(*args)
build(x, y, weight, psi, indices)

Build the approximation.

Parameters:
x2-d sequence of float

The input random observations \left\{\vect{X}^{(1)}, ..., \vect{X}^{(n)}\right\} where \vect{X}=(X_1, \dots, X_{n_X})^T is the input of the physical model, n_X is the input dimension and n is the sample size.

y2-d sequence of float

The output random observations \left\{\vect{Y}^{(1)}, ..., \vect{Y}^{(n)}\right\} where \vect{Y}=(Y_1, \dots, Y_{n_Y})^T is the output of the physical model, n_Y is the output dimension and n is the sample size.

weightsequence of float

Weights associated to the input sample points such that the corresponding weighted experiment is a good approximation of \mu, where \mu is the distribution of the standard random vector \vect{Z} associated with the physical input random vector \vect{X}. If unspecified, all weights are equal to \frac{1}{n}, where n is the size of the sample.

psisequence of Function

The functional basis.

indicessequence of int

Indices in the basis.

Returns:
algorithm: ApproximationAlgorithm

The estimation algorithm.

getBasisSequenceFactory()

Accessor to the basis sequence factory.

Returns:
basisBasisSequenceFactory

Basis sequence factory.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

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

getFittingAlgorithm()

Accessor to the fitting algorithm.

Returns:
algoFittingAlgorithm

Fitting algorithm.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

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 leads to a sparse functional chaos expansion.

Returns:
involvesModelSelectionbool

True if the method involves a model selection method.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

Examples using the class

Compute grouped indices for the Ishigami function

Compute grouped indices for the Ishigami function

Validate a polynomial chaos

Validate a polynomial chaos

Create a full or sparse polynomial chaos expansion

Create a full or sparse polynomial chaos expansion

Advanced polynomial chaos construction

Advanced polynomial chaos construction

Create a polynomial chaos for the Ishigami function: a quick start guide to polynomial chaos

Create a polynomial chaos for the Ishigami function: a quick start guide to polynomial chaos

Polynomial chaos is sensitive to the degree

Polynomial chaos is sensitive to the degree

Compute Sobol’ indices confidence intervals

Compute Sobol' indices confidence intervals

Conditional expectation of a polynomial chaos expansion

Conditional expectation of a polynomial chaos expansion

Polynomial chaos expansion cross-validation

Polynomial chaos expansion cross-validation

Metamodel of a field function

Metamodel of a field function

Compute leave-one-out error of a polynomial chaos expansion

Compute leave-one-out error of a polynomial chaos expansion