AdaptiveStrategy

class AdaptiveStrategy(*args)

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

Available constructors:

AdaptiveStrategy(orthogonalBasis, dimension)

AdaptiveStrategy(adaptiveStrategyImplementation)

Parameters:

orthogonalBasis : OrthogonalBasis

An OrthogonalBasis.

dimension : positive int

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

adaptiveStrategyImplementation : AdaptiveStrategyImplementation

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 in OpenTURNS :

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() Compute initial basis for the approximation.
getBasis() Accessor to the underlying orthogonal basis.
getClassName() Accessor to the object’s name.
getId() Accessor to the object’s id.
getImplementation(*args) Accessor to the underlying implementation.
getMaximumDimension() Accessor to the maximum dimension of the orthogonal basis.
getName() Accessor to the object’s name.
getPsi() Accessor to the orthogonal polynomials of the basis.
setMaximumDimension(maximumDimension) Accessor to the maximum dimension of the orthogonal basis.
setName(name) Accessor to the object’s name.
updateBasis(alpha_k, residual, relativeError) Update the basis for the next iteration of approximation.
__init__(*args)

x.__init__(…) initializes x; see help(type(x)) for signature

computeInitialBasis()

Compute initial basis for the approximation.

See also

getPsi

getBasis()

Accessor to the underlying orthogonal basis.

Returns:

basis : OrthogonalBasis

Orthogonal basis of which the adaptive strategy is based.

getClassName()

Accessor to the object’s name.

Returns:

class_name : str

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

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getImplementation(*args)

Accessor to the underlying implementation.

Returns:

impl : Implementation

The implementation class.

getMaximumDimension()

Accessor to the maximum dimension of the orthogonal basis.

Returns:

P : integer

Maximum dimension of the truncated basis.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getPsi()

Accessor to the orthogonal polynomials of the basis.

Returns:

polynomials : list 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(maximumDimension)

Accessor to the maximum dimension of the orthogonal basis.

Parameters:

P : integer

Maximum dimension of the truncated basis.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

updateBasis(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.