mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-13 10:38:40 +00:00
Implementing more regressions, arima draft (not complete), some more average and error functions.
19 lines
433 B
PHP
19 lines
433 B
PHP
<?php
|
|
|
|
class MultipleLinearRegression {
|
|
public static function getRegression(array $x, array $y) : array {
|
|
$X = new Matrix(count($x), count($x[0]));
|
|
$X->setArray($x);
|
|
$XT = $X->transpose();
|
|
|
|
$Y = new Matrix(count($y));
|
|
$Y->setArray($y);
|
|
|
|
|
|
return $XT->mult($X)->inverse()->mult($XT)->mult($Y)->toArray();
|
|
}
|
|
|
|
public static function getVariance() : float {}
|
|
|
|
public static function getPredictionInterval() : array {}
|
|
} |