More type work

This commit is contained in:
2023-08-02 09:36:44 +00:00
parent 16ad8175d9
commit a60187a3fd
14 changed files with 38 additions and 31 deletions

View File

@ -44,10 +44,10 @@ class Rating implements \Stringable
return $this->mean - $this->conservativeStandardDeviationMultiplier * $this->standardDeviation;
}
public function getPartialUpdate(Rating $prior, Rating $fullPosterior, $updatePercentage): Rating
public function getPartialUpdate(Rating $prior, Rating $fullPosterior, float $updatePercentage): Rating
{
$priorGaussian = new GaussianDistribution($prior->getMean(), $prior->getStandardDeviation());
$posteriorGaussian = new GaussianDistribution($fullPosterior->getMean(), $fullPosterior . getStandardDeviation());
$posteriorGaussian = new GaussianDistribution($fullPosterior->getMean(), $fullPosterior->getStandardDeviation());
// From a clarification email from Ralf Herbrich:
// "the idea is to compute a linear interpolation between the prior and posterior skills of each player