edges_cal.modelling.FixedLinearModel
- class edges_cal.modelling.FixedLinearModel(*, model: Model, x, init_basis=None)[source]
A base class for a linear model fixed at a certain set of co-ordinates.
Using this class caches the basis functions at the particular coordinates, and thus speeds up the fitting of multiple sets of data at those co-ordinates.
- Parameters:
model (edges_cal.modelling.Model) – The linear model to evaluate at the co-ordinates
x (numpy.ndarray) – A set of co-ordinates at which to evaluate the model.
init_basis – If the basis functions of the model, evaluated at x, are known already, they can be input directly to save computation time.
Methods
__init__
(*, model, x[, init_basis])Method generated by attrs for class FixedLinearModel.
at_x
(x)Return a new
FixedLinearModel
at given co-ordinates.fit
(ydata[, weights, xdata])Create a linear-regression fit object.
from_yaml
(loader, node)Convert a representation node to a Python object.
to_yaml
(dumper, data)Method to convert to YAML format.
with_nterms
(n_terms[, parameters])Return a new
FixedLinearModel
with given nterms and parameters.with_params
(parameters)Return a new
FixedLinearModel
with givne parameters.Attributes
The (cached) basis functions at default_x.
The number of terms/parameters in the model.
The parameters of the model, if set.