setMatrix($x); $XT = $X->transpose(); $Y = new Matrix(\count($y)); $Y->setMatrix($y); return $XT->mult($X)->inverse()->mult($XT)->mult($Y)->getMatrix(); } /** * {@inheritdoc} */ public static function getVariance() : float { } /** * {@inheritdoc} */ public static function getPredictionInterval() : array { } /** * {@inheritdoc} */ public static function getSlope(float $b1, float $y, float $x) : float { return 0.0; } /** * {@inheritdoc} */ public static function getElasticity(float $b1, float $y, float $x): float { return 0.0; } }