LinearModelAlgorithm¶

class
LinearModelAlgorithm
(*args)¶ Class used to create a linear model from numerical samples.
Available usages:
LinearModelAlgorithm(Xsample, Ysample)
LinearModelAlgorithm(Xsample, basis, Ysample)
 Parameters
 XSample2d sequence of float
The input samples of a model.
 YSample2d sequence of float
The output samples of a model, must be of dimension 1.
 basis
Basis
The basis .
See also
Notes
This class is used in order to create a linear model from data samples. The linear regression model between the scalar variable and the dimensional vector writes as follows:
where is the residual, supposed to follow the standard Normal distribution, a functional basis. The algorithm class enables to estimate the coefficients of the linear expansion.
If basis is not specified, the underlying model is :
 The coefficients are evaluated using a least squares method. Default
method is QR. User might choose also SVD or Cholesky (usefull if basis is orthogonal) and large dataset.
The evaluation of the coefficients is completed by some usefull parameters that could help the diagnostic of the linearity.
Methods
getBasis
(self)Accessor to the input basis.
getClassName
(self)Accessor to the object’s name.
getDistribution
(self)Accessor to the joint probability density function of the physical input vector.
getId
(self)Accessor to the object’s id.
getInputSample
(self)Accessor to the input sample.
getName
(self)Accessor to the object’s name.
getOutputSample
(self)Accessor to the output sample.
getResult
(self)Accessor to the computed linear model.
getShadowedId
(self)Accessor to the object’s shadowed id.
getVisibility
(self)Accessor to the object’s visibility state.
hasName
(self)Test if the object is named.
hasVisibleName
(self)Test if the object has a distinguishable name.
run
(self)Compute the response surfaces.
setDistribution
(self, distribution)Accessor to the joint probability density function of the physical input vector.
setName
(self, name)Accessor to the object’s name.
setShadowedId
(self, id)Accessor to the object’s shadowed id.
setVisibility
(self, visible)Accessor to the object’s visibility state.

__init__
(self, \*args)¶ Initialize self. See help(type(self)) for accurate signature.

getBasis
(self)¶ Accessor to the input basis.
 Returns
 basis
Basis
The basis which had been passed to the constructor.
 basis

getClassName
(self)¶ Accessor to the object’s name.
 Returns
 class_namestr
The object class name (object.__class__.__name__).

getDistribution
(self)¶ Accessor to the joint probability density function of the physical input vector.
 Returns
 distribution
Distribution
Joint probability density function of the physical input vector.
 distribution

getId
(self)¶ Accessor to the object’s id.
 Returns
 idint
Internal unique identifier.

getInputSample
(self)¶ Accessor to the input sample.
 Returns
 inputSample
Sample
The Xsample which had been passed to the constructor.
 inputSample

getName
(self)¶ Accessor to the object’s name.
 Returns
 namestr
The name of the object.

getOutputSample
(self)¶ Accessor to the output sample.
 Returns
 outputSample
Sample
The Ysample which had been passed to the constructor.
 outputSample

getResult
(self)¶ Accessor to the computed linear model.
 Returns
 result
LinearModelResult
The linear model built from numerical samples, along with other useful informations.
 result

getShadowedId
(self)¶ Accessor to the object’s shadowed id.
 Returns
 idint
Internal unique identifier.

getVisibility
(self)¶ Accessor to the object’s visibility state.
 Returns
 visiblebool
Visibility flag.

hasName
(self)¶ Test if the object is named.
 Returns
 hasNamebool
True if the name is not empty.

hasVisibleName
(self)¶ Test if the object has a distinguishable name.
 Returns
 hasVisibleNamebool
True if the name is not empty and not the default one.

run
(self)¶ Compute the response surfaces.
Notes
It computes the response surfaces and creates a
MetaModelResult
structure containing all the results.

setDistribution
(self, distribution)¶ Accessor to the joint probability density function of the physical input vector.
 Parameters
 distribution
Distribution
Joint probability density function of the physical input vector.
 distribution

setName
(self, name)¶ Accessor to the object’s name.
 Parameters
 namestr
The name of the object.

setShadowedId
(self, id)¶ Accessor to the object’s shadowed id.
 Parameters
 idint
Internal unique identifier.

setVisibility
(self, visible)¶ Accessor to the object’s visibility state.
 Parameters
 visiblebool
Visibility flag.