Linear interpolator
曲线拟合类,只适用于线性拟合:
y = a*x + by = a + a1*x + a2*x^2 + ... + an*x^n
Linear interpolator
曲线拟合类,只适用于线性拟合:
y = a*x + by = a + a1*x + a2*x^2 + ... + an*x^n01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| LinearFit | 2 | 直线拟合-一元回归,拟合的结果可以使用getFactor获取,或者使用getSlope获取斜率,getIntercept获取截距 |
| PolyFit | 2 | 多项式拟合,拟合y=a0+a1*x+a2*x^2+……+apoly_n*x^poly_n |
| SeriesLength | 1 | 获取两个vector的安全size |
03 Members
Vector, Vector)直线拟合-一元回归,拟合的结果可以使用getFactor获取,或者使用getSlope获取斜率,getIntercept获取截距
| Name | Type | Description |
|---|---|---|
x | Vector | 观察值的x |
y | Vector | 观察值的y |
Double(), Double(), Int32)Least squares resolve the linear fitting
| Name | Type | Description |
|---|---|---|
x | Double() | x axis |
y | Double() | y axis |
length | Int32 | length of the vector of x or y |
Vector, Vector, Int32)多项式拟合,拟合y=a0+a1x+a2x^2+……+apoly_n*x^poly_n
| Name | Type | Description |
|---|---|---|
x | Vector | 观察值的x |
y | Vector | 观察值的y |
poly_n | Int32 | 期望拟合的阶数,若poly_n=2,则y=a0+a1x+a2x^2 |
Double(), Double(), Int32)多项式拟合
| Name | Type | Description |
|---|---|---|
x# | Double() | - |
y# | Double() | - |
poly_n% | Int32 | 最高的阶数 |
IEnumerable(Of Double), IEnumerable(Of Double))获取两个vector的安全size
| Name | Type | Description |
|---|---|---|
x | IEnumerable(Of Double) | - |
y | IEnumerable(Of Double) | - |
最小的一个长度