PenalizedLeastSquaresAlgorithmFactory

class PenalizedLeastSquaresAlgorithmFactory(*args)

Penalized least squares algorithm factory.

Notes

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

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

Methods

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

Build the approximation.

getClassName()

Accessor to the object's name.

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.

__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.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

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

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:
involvesModelSelection: bool

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

Create a full or sparse polynomial chaos expansion

Create a full or sparse polynomial chaos expansion

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

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