AdaptiveStrategy¶
- class AdaptiveStrategy(*args)¶
- Base class for the construction of the truncated multivariate orthogonal basis. - 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.
 
- orthogonalBasis
 - 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 selected orthogonal polynomials in 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. - 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 two 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. - __init__(*args)¶
 - getBasis()¶
- Accessor to the underlying orthogonal basis. - Returns:
- basisOrthogonalBasis
- 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:
- maximumDimensionint
- Maximum dimension of the truncated basis. 
 
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - getPsi()¶
- Accessor to the selected orthogonal polynomials in the basis. - The value returned by this method depends on the specific choice of adaptive strategy and the previous calls to the - updateBasis()method.- Returns:
- polynomialslist of polynomials
- Sequence of - 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:
- maximumDimensionint
- 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. - Parameters:
- alpha_k: sequence of floats
- The coefficients of the expansion at this step. 
- residual: float
- The current value of the residual. 
- relativeError: float
- The relative error. 
 
 
 
 OpenTURNS
      OpenTURNS