java实现 1阶2项式的拟合
ic class TestPoly {
/* 离散的实验样本观察数据,进行一阶二项式函数的拟合测试 auth:tlc */
public static void main(String[] args) {
/** 1阶2项式的拟合 */
PolynomialCurveFitter polynomialCurveFitter = PolynomialCurveFitter.create(1);/** 一阶 */
ArrayList weightedObservedPoints = new ArrayList();
/* 样本数据集合 157*157 */
double[] x = { 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25,
25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 30,
30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34,
35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39,
40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 44, 44, 44,