Polyfit: Polyfit

Description Usage Arguments Value

Description

Least squares polynomial fit. Fit a polynomial p(x) = p[0] * x^{deg} + ... + p[deg] of degree deg to points (x, y). Returns a vector of coefficients p that minimises the squared error.

Usage

1
Polyfit(x, y, deg)

Arguments

x

KHIVA array with the x-coordinates of the M sample points (x[i], y[i]).

y

KHIVA array with the y-coordinates of the sample points.

deg

Degree of the fitting polynomial

Value

: KHIVA array with the polynomial coefficients, highest power first.


shapelets/khiva-r documentation built on June 10, 2019, 4:58 a.m.