MCordingley\Regression\StatisticsGatherer\Linear::getSumSquaredModel PHP Метод

getSumSquaredModel() приватный Метод

Calculates the sum-squared error of the regression. This is the sum of the squared distances of predicted values from their average.
private getSumSquaredModel ( ) : float
Результат float
    private function getSumSquaredModel() : float
    {
        if (is_null($this->sumSquaredModel)) {
            $average = array_sum($this->observations->getOutcomes()) / count($this->observations->getOutcomes());
            $this->sumSquaredModel = static::sumSquaredDifference($this->getPredictedOutcomes(), $average);
        }
        return $this->sumSquaredModel;
    }