LinearModel

class LinearModel(*args)

The linear model class is created through the method build of a LinearModelFactory.

Methods

getClassName() Accessor to the object’s name.
getConfidenceIntervals() Accessor to the confidence intervals.
getId() Accessor to the object’s id.
getName() Accessor to the object’s name.
getPValues() Accessor to the p-values.
getPredicted(predictor) Accessor to the evaluation function of linear model.
getRegression() Accessor to the regression coefficients.
getResidual(predictor, measured) Accessor to the residuals.
getShadowedId() Accessor to the object’s shadowed id.
getVisibility() Accessor to the object’s visibility state.
hasName() Test if the object is named.
hasVisibleName() Test if the object has a distinguishable name.
setName(name) Accessor to the object’s name.
setShadowedId(id) Accessor to the object’s shadowed id.
setVisibility(visible) Accessor to the object’s visibility state.
__init__(*args)
getClassName()

Accessor to the object’s name.

Returns:

class_name : str

The object class name (object.__class__.__name__).

getConfidenceIntervals()

Accessor to the confidence intervals.

Returns:

confInterval : Interval

The confidence intervals of the linear model coefficients, corresponding to the level precised when the LinearModel class has been created through the method build.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getPValues()

Accessor to the p-values.

Returns:

pvalues : collection of NumericalScalar

The collection of the p-values of the linear model coefficients.

getPredicted(predictor)

Accessor to the evaluation function of linear model.

Parameters:

sampleX : 2-d sequence of float

The input sample to be evaluated by the linear model.

Returns:

Y : NumericalSample

The response Y evaluated through the linear model on the sample sampleX.

getRegression()

Accessor to the regression coefficients.

Returns:

coef : NumericalPoint

The coefficients of the linear model: (a_0, a_1, \ldots, a_n).

getResidual(predictor, measured)

Accessor to the residuals.

Parameters:

Xsample: 2-d sequence of float

The input sample on which the linear model has been built.

Ysample: 2-d sequence of float

The 1d output sample on which the linear model has been built.

Returns:

residual : NumericalSample

The residuals computed on each point.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:

id : int

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:

visible : bool

Visibility flag.

hasName()

Test if the object is named.

Returns:

hasName : bool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:

hasVisibleName : bool

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

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:

id : int

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:

visible : bool

Visibility flag.