PolynomialFitter¶
-
class
glue.core.fitters.
PolynomialFitter
(**params)[source]¶ Bases:
glue.core.fitters.BaseFitter1D
A polynomial model.
The degree of the polynomial is specified by
degree
Attributes Summary
An integer-valued option.
Methods Summary
fit
(self, x, y, dy, constraints[, degree])Fit a polynomial of order
degree
to the data.predict
(self, fit_result, x)Evaluate the model at a set of locations.
summarize
(self, 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
-
predict
(self, fit_result, x)[source]¶ 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
-