PolynomialFitter#
- class glue.core.fitters.PolynomialFitter(**params)#
Bases:
BaseFitter1DA polynomial model.
The degree of the polynomial is specified by
degreeAttributes Summary
Methods Summary
fit(x, y, dy, constraints[, degree])Fit a polynomial of order
degreeto the data.predict(fit_result, x)Evaluate the model at a set of locations.
summarize(fit_result, x, y[, dy])Return a textual summary of the fit.
Attributes Documentation
- degree#
An integer-valued option.
- Parameters:
- minint, optional
The minimum valid value
- maxint, optional
The maximum valid value
- defaultint, optional
The default value
- labelstr, optional
A short label for this option
- label = 'Polynomial'#
Methods Documentation
- fit(x, y, dy, constraints, degree=2)#
Fit a polynomial of order
degreeto the data.
- predict(fit_result, x)#
Evaluate the model at a set of locations.
This must be overridden in a subclass.
- Parameters:
fit_result – The result from the fit method
x (
numpy.ndarray) – Locations to evaluate model at
- Returns:
model(x)
- Return type: