ParametricModel#

class relife.base.ParametricModel(**kwparams)[source]#

Base class of every parametric models in ReLife.

Methods

get_params

Get the parameters of this model.

get_params_names

Parameters names.

set_params

Set the parameters of this model.

get_params()[source]#

Get the parameters of this model.

Returns:
out1darray of number

Model parameters.

Notes

If parameter values are not set, they default to np.nan values.

get_params_names()[source]#

Parameters names.

Returns:
list of str

Parameters names

Notes

Parameters values can be requested (a.k.a. get) by their name at instance level.

set_params(new_params)[source]#

Set the parameters of this model.

Parameters:
new_paramsarray-like of floats

Model parameters.

Notes

set_params definition expects an array-like of floats. At runtime, complex parameters might be setted temporarily to approximate fitted parameters covariance. This is contradictory to the given typing. At the moment, we don’t see a better solution and we believe that this is actually a limitation of what be expressed in the static typesystem.