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.
- 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 aCleaningStrategy
.
- orthogonalBasis
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 of .
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
Compute initial basis for the approximation.
getBasis
()Accessor to the underlying orthogonal basis.
Accessor to the object's name.
getId
()Accessor to the object's id.
Accessor to the underlying implementation.
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)¶
- getBasis()¶
Accessor to the underlying orthogonal basis.
- Returns
- basis
OrthogonalBasis
Orthogonal basis of which the adaptive strategy is based.
- basis
- getClassName()¶
Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
- getId()¶
Accessor to the object’s id.
- Returns
- idint
Internal unique identifier.
- getImplementation()¶
Accessor to the underlying implementation.
- Returns
- implImplementation
A copy of the underlying implementation object.
- getMaximumDimension()¶
Accessor to the maximum dimension of the orthogonal basis.
- Returns
- Pinteger
Maximum dimension of the truncated basis.
- getName()¶
Accessor to the object’s name.
- Returns
- namestr
The name of the object.
- getPsi()¶
Accessor to the orthogonal polynomials of the basis.
- Returns
- polynomialslist of polynomials
Sequence of 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
- Pinteger
Maximum dimension of the truncated basis.
- setName(name)¶
Accessor to the object’s name.
- Parameters
- namestr
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.