DesignProxy

class DesignProxy(*args)

Design matrix cache.

Available constructors:

DesignProxy(x, basis)

DesignProxy(matrix)

Parameters:
xSample

Input sample

psisequence of Function

Basis

matrix2-d sequence of float
The design matrix

Notes

Helps to cache evaluations of the design matrix. Can be useful for an iterative least squares problem resolution or in interaction with LeastSquaresMethod to select the algorithm used for the resolution of linear least-squares problems.

Methods

computeDesign(indices)

Build the design matrix.

getBasis(*args)

Accessor to the basis.

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

getInputSample()

Input sample accessor.

getName()

Accessor to the object's name.

getRowFilter()

Row filter accessor.

getSampleSize()

Sample size accessor.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasRowFilter()

Row filter flag accessor.

hasVisibleName()

Test if the object has a distinguishable name.

setName(name)

Accessor to the object's name.

setRowFilter(rowFilter)

Row filter accessor.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

__init__(*args)
computeDesign(indices)

Build the design matrix.

Parameters:
indicessequence of int

Indices of the current basis in the global basis

Returns:
psiAkMatrix

The design matrix

getBasis(*args)

Accessor to the basis.

Parameters:
indicessequence of int, optional

Indices of the active functions in the basis

Returns:
activeBasisCollection of Function

Collection of functions of the basis associated to the given indices. By default, the whole 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.

getInputSample()

Input sample accessor.

Returns:
inputSampleSample

Input sample.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getRowFilter()

Row filter accessor.

Returns:
rowFilterIndices

Sub-indices in of the sample in the current indices

getSampleSize()

Sample size accessor.

Returns:
sampleSizeint

Size of sample accounting for row filter

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

hasRowFilter()

Row filter flag accessor.

Returns:
hasRowFilterbool

Whether sub-indices of the basis are set

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleNamebool

True if the name is not empty and not the default one.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setRowFilter(rowFilter)

Row filter accessor.

Parameters:
rowFiltersequence of int

Sub-indices in of the sample in the current indices

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visiblebool

Visibility flag.

Examples using the class

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