SplineSmoothingFitter#
- class astropy.modeling.spline.SplineSmoothingFitter[source]#
Bases:
_SplineFitterFit a smoothing spline.
Methods Summary
__call__(model, x, y, **kwargs)Fit a smoothing spline to data.
Methods Documentation
- __call__(model, x, y, **kwargs)[source]#
Fit a smoothing spline to data.
- Parameters:
- model
Spline1D The spline model to fit.
- xnumpy:array_like
The x data values.
- ynumpy:array_like
The y data values.
- s
python:float, optional Positive smoothing factor used to choose the number of knots. The parameter can be used to control the tradeoff between closeness and smoothness of fit. Larger
smeans more smoothing while smaller values ofsindicate less smoothing. automatically. A value of 0 results in an interpolating spline. Seescipy.interpolate.UnivariateSplinefor details.- **kwargs
python:dict, optional Additional keyword arguments:
weightsarray-like, optionalWeights for the data points.
bboxarray-like, optionalThe bounding box limits as
[xmin, xmax]. Default is[None, None].
- model
- Returns:
- fitted_model
Spline1D A copy of the input model with fitted parameters.
- fitted_model