|
|
|
@ -47,6 +47,13 @@ module Fit = |
|
|
|
/// returning a function y' for the best fitting line. |
|
|
|
let lineFunc x y = Fit.LineFunc(x,y) |> tofs |
|
|
|
|
|
|
|
/// Least-Squares fitting the points ((x0,x1,...,xk),y) to a linear surface y : X -> p0*x0 + p1*x1 + ... + pk*xk, |
|
|
|
/// returning its best fitting parameters as [p0, p1, p2, ..., pk] array. |
|
|
|
let multiDim intercept x y = Fit.MultiDim(x,y,intercept) |
|
|
|
|
|
|
|
/// Least-Squares fitting the points ((x0,x1,...,xk),y) to a linear surface y : X -> p0*x0 + p1*x1 + ... + pk*xk, |
|
|
|
/// returning a function y' for the best fitting surface. |
|
|
|
let multiDimFunc intercept x y = Fit.MultiDimFunc(x,y,intercept) |> tofs |
|
|
|
|
|
|
|
/// Least-Squares fitting the points (x,y) to a k-order polynomial y : x -> p0 + p1*x + p2*x^2 + ... + pk*x^k, |
|
|
|
/// returning its best fitting parameters as [p0, p1, p2, ..., pk] array, compatible with Evaluate.Polynomial. |
|
|
|
@ -56,7 +63,6 @@ module Fit = |
|
|
|
/// returning a function y' for the best fitting polynomial. |
|
|
|
let polynomialFunc order x y = Fit.PolynomialFunc(x,y,order) |> tofs |
|
|
|
|
|
|
|
|
|
|
|
/// Least-Squares fitting the points (x,y) to an arbitrary linear combination y : x -> p0*f0(x) + p1*f1(x) + ... + pk*fk(x), |
|
|
|
/// returning its best fitting parameters as [p0, p1, p2, ..., pk] list. |
|
|
|
let linear functions (x:_[]) (y:float[]) = |
|
|
|
|