classmethod HermiteE.fit(x, y, deg, domain=None, rcond=None, full=False, w=None, window=None)
[source]
Least squares fit to data.
Return a series instance that is the least squares fit to the data y
sampled at x
. The domain of the returned instance can be specified and this will often result in a superior fit with less chance of ill conditioning.
Parameters: |
x : array_like, shape (M,) x-coordinates of the M sample points y : array_like, shape (M,) or (M, K) y-coordinates of the sample points. Several data sets of sample points sharing the same x-coordinates can be fitted at once by passing in a 2D-array that contains one dataset per column. deg : int or 1-D array_like Degree(s) of the fitting polynomials. If domain : {None, [beg, end], []}, optional Domain to use for the returned series. If rcond : float, optional Relative condition number of the fit. Singular values smaller than this relative to the largest singular value will be ignored. The default value is len(x)*eps, where eps is the relative precision of the float type, about 2e-16 in most cases. full : bool, optional Switch determining nature of return value. When it is False (the default) just the coefficients are returned, when True diagnostic information from the singular value decomposition is also returned. w : array_like, shape (M,), optional Weights. If not None the contribution of each point New in version 1.5.0. window : {[beg, end]}, optional Window to use for the returned series. The default value is the default class domain New in version 1.6.0. |
---|---|
Returns: |
new_series : series A series that represents the least squares fit to the data and has the domain specified in the call. [resid, rank, sv, rcond] : list These values are only returned if resid – sum of squared residuals of the least squares fit rank – the numerical rank of the scaled Vandermonde matrix sv – singular values of the scaled Vandermonde matrix rcond – value of For more details, see |
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.polynomial.hermite_e.HermiteE.fit.html