$m, 'intercept' => $b);
}
$x = array(1, 2, 3, 4, 5);
$y = array(2, 4, 6, 8, 10);
$coefficients = linearRegression($x, $y);
echo '斜率 (Slope): ' . $coefficients['slope'] . '
'; echo '截距 (Intercept): ' . $coefficients['intercept']; ?>
'; echo '截距 (Intercept): ' . $coefficients['intercept']; ?>
顶一下
(0)
0%
踩一下
(0)
0%
- 相关评论
- 我要评论
-