Bit of documentation effort
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2024-02-26 09:19:39 +00:00
parent edc80f9a43
commit 783a12e744
6 changed files with 96 additions and 34 deletions

View File

@ -4,9 +4,11 @@ declare(strict_types=1);
namespace DNW\Skills;
// Container for a player's rating.
use DNW\Skills\Numerics\GaussianDistribution;
/**
* Container for a player's rating.
*/
class Rating implements \Stringable
{
private const CONSERVATIVE_STANDARD_DEVIATION_MULTIPLIER = 3;
@ -46,6 +48,9 @@ class Rating implements \Stringable
return $this->mean - $this->conservativeStandardDeviationMultiplier * $this->standardDeviation;
}
/**
* Get a partial rating update.
*/
public function getPartialUpdate(Rating $prior, Rating $fullPosterior, float $updatePercentage): Rating
{
$priorGaussian = new GaussianDistribution($prior->getMean(), $prior->getStandardDeviation());