Basis

class Basis(*args)

Basis.

Available constructors:

Basis(functionsColl)

Basis(size)

Parameters:
functionsColllist of Function

Functions constituting the Basis.

sizeint

Size of the Basis.

Methods

add(elt)

Add a function.

build(index)

Build the element of the given index.

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

getImplementation()

Accessor to the underlying implementation.

getInputDimension()

Get the input dimension of the Basis.

getName()

Accessor to the object's name.

getOutputDimension()

Get the output dimension of the Basis.

getSize()

Get the size of the Basis.

getSubBasis(indices)

Get a sub-basis of the Basis.

isFinite()

Tell whether the basis is finite.

isOrthogonal()

Tell whether the basis is orthogonal.

setName(name)

Accessor to the object's name.

Examples

>>> import openturns as ot
>>> dimension = 3
>>> input = ['x0', 'x1', 'x2']
>>> functions = []
>>> for i in range(dimension):
...     functions.append(ot.SymbolicFunction(input, [input[i]]))
>>> basis = ot.Basis(functions)
__init__(*args)
add(elt)

Add a function.

Parameters:
functiona Function

Function to be added.

build(index)

Build the element of the given index.

Parameters:
indexint, index \geq 0

Index of an element of the Basis.

Returns:
functionFunction

The function at the index index of the Basis.

Examples

>>> import openturns as ot
>>> dimension = 3
>>> input = ['x0', 'x1', 'x2']
>>> functions = []
>>> for i in range(dimension):
...     functions.append(ot.SymbolicFunction(input, [input[i]]))
>>> basis = ot.Basis(functions)
>>> print(basis.build(0).getEvaluation())
[x0,x1,x2]->[x0]
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.

getInputDimension()

Get the input dimension of the Basis.

Returns:
inDimint

Input dimension of the functions.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getOutputDimension()

Get the output dimension of the Basis.

Returns:
outDimint

Output dimension of the functions.

getSize()

Get the size of the Basis.

Returns:
sizeint

Size of the Basis.

getSubBasis(indices)

Get a sub-basis of the Basis.

Parameters:
indiceslist of int

Indices of the terms of the Basis put in the sub-basis.

Returns:
subBasislist of Function

Functions defining a sub-basis.

Examples

>>> import openturns as ot
>>> dimension = 3
>>> input = ['x0', 'x1', 'x2']
>>> functions = []
>>> for i in range(dimension):
...     functions.append(ot.SymbolicFunction(input, [input[i]]))
>>> basis = ot.Basis(functions)
>>> subbasis = basis.getSubBasis([1])
>>> print(subbasis[0].getEvaluation())
[x0,x1,x2]->[x1]
isFinite()

Tell whether the basis is finite.

Returns:
isFinitebool

True if the basis is finite.

isOrthogonal()

Tell whether the basis is orthogonal.

Returns:
isOrthogonalbool

True if the basis is orthogonal.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

Examples using the class

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on the Port Pirie sea-levels data

Estimate a GEV on the Port Pirie sea-levels data

Estimate a GEV on race times data

Estimate a GEV on race times data

Estimate a GPD on the daily rainfall data

Estimate a GPD on the daily rainfall data

Create a multivariate basis of functions from scalar multivariable functions

Create a multivariate basis of functions from scalar multivariable functions

Create multivariate functions

Create multivariate functions

Gaussian Process Regression vs KrigingAlgorithm

Gaussian Process Regression vs KrigingAlgorithm

Mixture of experts

Mixture of experts

Create a general linear model metamodel

Create a general linear model metamodel

Perform stepwise regression

Perform stepwise regression

Gaussian Process Regression: multiple input dimensions

Gaussian Process Regression: multiple input dimensions

Gaussian Process Regression : quick-start

Gaussian Process Regression : quick-start

Advanced Gaussian process regression

Advanced Gaussian process regression

Gaussian Process Regression: choose an arbitrary trend

Gaussian Process Regression: choose an arbitrary trend

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression : cantilever beam model

Gaussian Process Regression : cantilever beam model

Gaussian Process Regression: surrogate model with continuous and categorical variables

Gaussian Process Regression: surrogate model with continuous and categorical variables

Gaussian Process Regression: choose a polynomial trend

Gaussian Process Regression: choose a polynomial trend

Gaussian process fitter: configure the optimization solver

Gaussian process fitter: configure the optimization solver

Gaussian Process Regression: use an isotropic covariance kernel

Gaussian Process Regression: use an isotropic covariance kernel

Gaussian process regression: draw the likelihood

Gaussian process regression: draw the likelihood

Gaussian Process Regression : generate trajectories from the metamodel

Gaussian Process Regression : generate trajectories from the metamodel

Gaussian Process Regression: metamodel of the Branin-Hoo function

Gaussian Process Regression: metamodel of the Branin-Hoo function

Example of multi output Gaussian Process Regression on the fire satellite model

Example of multi output Gaussian Process Regression on the fire satellite model

Gaussian Process Regression: propagate uncertainties

Gaussian Process Regression: propagate uncertainties

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

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

Compute confidence intervals of a regression model from data

Compute confidence intervals of a regression model from data

EfficientGlobalOptimization examples

EfficientGlobalOptimization examples

Create a functional basis process

Create a functional basis process

Create a process from random vectors and processes

Create a process from random vectors and processes

Trend computation

Trend computation

Estimate Sobol indices on a field to point function

Estimate Sobol indices on a field to point function