//
pkg.gl
Category
github.com/openacid/slimarray
polyfit
package
0.1.3
Repository:
https://github.com/openacid/slimarray.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
3
Dependents
1
Files
319 SLOC
#
Functions
NewFit
NewFit creates a new polynomial fitting context, with points and the degree of the polynomial.
NewFitIntRange
NewFitIntRange is similar to NewFit, except it only accept integer value for x, and the value of x must be in range [0, 1024).
#
Variables
PowCache
PowCache caches x^i in PowCache[x][i].
XTXCache3
XTXCache3 is the cache of XᵀX of degree 2 with integer matrix X = [[1,0,0], [1,1,1], [1,2,4]...].
#
Structs
Fit
Fit models a polynomial y from sample points xs and ys, to minimizes the squared residuals.