private function getSumSquaredError() : float
{
if (is_null($this->sumSquaredError)) {
$this->sumSquaredError = array_sum(array_map(function ($predicted, $observed) {
return pow($predicted - $observed, 2);
}, $this->getPredictedOutcomes(), $this->observations->getOutcomes()));
}
return $this->sumSquaredError;
}