PolynomialFitter¶
- class glue.core.fitters.PolynomialFitter(**params)[source]¶
Bases:
BaseFitter1D
A polynomial model.
The degree of the polynomial is specified by
degree
Attributes Summary
An integer-valued option.
A short label for the fit, used by the GUI
Methods Summary
fit
(x, y, dy, constraints[, degree])Fit a polynomial of order
degree
to 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'¶
A short label for the fit, used by the GUI
Methods Documentation
- predict(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: