# LinearLSQFitter¶

class astropy.modeling.fitting.LinearLSQFitter[source] [edit on github]

Bases: object

A class performing a linear least square fitting.

Uses numpy.linalg.lstsq to do the fitting. Given a model and data, fits the model to the data and changes the model’s parameters. Keeps a dictionary of auxiliary fitting information.

Attributes Summary

Methods Summary

 __call__(model, x, y[, z, weights, rcond]) Fit data to this model.

Attributes Documentation

supported_constraints = ['fixed']

Methods Documentation

__call__(model, x, y, z=None, weights=None, rcond=None)[source] [edit on github]

Fit data to this model.

Parameters: model : FittableModel model to fit to x, y, z x : array input coordinates y : array input coordinates z : array (optional) input coordinates weights : array (optional) weights rcond : float, optional Cut-off ratio for small singular values of a. Singular values are set to zero if they are smaller than rcond times the largest singular value of a. model_copy : FittableModel a copy of the input model with parameters set by the fitter