AdaptiveStrategy

class AdaptiveStrategy(*args)

Base class for the construction of the truncated multivariate orthogonal basis.

Available constructors:

AdaptiveStrategy(orthogonalBasis, dimension)

AdaptiveStrategy(adaptiveStrategyImplementation)

Parameters
orthogonalBasisOrthogonalBasis

An OrthogonalBasis.

dimensionpositive int

Number of terms of the basis. This first usage has the same implementation as the second with a FixedStrategy.

adaptiveStrategyImplementationAdaptiveStrategyImplementation

Adaptive strategy implementation which is a FixedStrategy, SequentialStrategy or a CleaningStrategy.

Notes

A strategy must be chosen for the selection of the different terms of the multivariate basis in which the response surface by functional chaos is expressed. The selected terms are regrouped in the finite subset K of \Nset.

There are three different strategies available:

These strategies are conceived in such a way to be adapted for other orthogonal expansions (other than polynomial). For the moment, their implementation are only useful for the polynomial chaos expansion.

Methods

computeInitialBasis(self)

Compute initial basis for the approximation.

getBasis(self)

Accessor to the underlying orthogonal basis.

getClassName(self)

Accessor to the object’s name.

getId(self)

Accessor to the object’s id.

getImplementation(self)

Accessor to the underlying implementation.

getMaximumDimension(self)

Accessor to the maximum dimension of the orthogonal basis.

getName(self)

Accessor to the object’s name.

getPsi(self)

Accessor to the orthogonal polynomials of the basis.

setMaximumDimension(self, maximumDimension)

Accessor to the maximum dimension of the orthogonal basis.

setName(self, name)

Accessor to the object’s name.

updateBasis(self, alpha_k, residual, …)

Update the basis for the next iteration of approximation.

__init__(self, \*args)

Initialize self. See help(type(self)) for accurate signature.

computeInitialBasis(self)

Compute initial basis for the approximation.

See also

getPsi
getBasis(self)

Accessor to the underlying orthogonal basis.

Returns
basisOrthogonalBasis

Orthogonal basis of which the adaptive strategy is based.

getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

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

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getImplementation(self)

Accessor to the underlying implementation.

Returns
implImplementation

The implementation class.

getMaximumDimension(self)

Accessor to the maximum dimension of the orthogonal basis.

Returns
Pinteger

Maximum dimension of the truncated basis.

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getPsi(self)

Accessor to the orthogonal polynomials of the basis.

Returns
polynomialslist of polynomials

Sequence of P analytical polynomials.

Notes

The method computeInitialBasis() must be applied first.

Examples

>>> import openturns as ot
>>> productBasis = ot.OrthogonalProductPolynomialFactory([ot.HermiteFactory()])
>>> adaptiveStrategy = ot.FixedStrategy(productBasis, 3)
>>> adaptiveStrategy.computeInitialBasis()
>>> print(adaptiveStrategy.getPsi())
[1,x0,-0.707107 + 0.707107 * x0^2]
setMaximumDimension(self, maximumDimension)

Accessor to the maximum dimension of the orthogonal basis.

Parameters
Pinteger

Maximum dimension of the truncated basis.

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

updateBasis(self, alpha_k, residual, relativeError)

Update the basis for the next iteration of approximation.

Notes

No changes are made to the basis in the fixed strategy.