Fixed factor list probability of ranking error due to missing factors from the iterated layer

This commit is contained in:
Jeff Moser 2010-10-02 22:28:25 -04:00
parent e56fa53348
commit 124d73fdbf
2 changed files with 9 additions and 4 deletions

@ -53,9 +53,6 @@ class FactorGraphTrueSkillCalculator extends SkillCalculator
$factorGraph->buildGraph();
$factorGraph->runSchedule();
$test = $factorGraph->getUpdatedRatings();
// DEBUG: Fix this :)
$probabilityOfOutcome = $factorGraph->getProbabilityOfRanking();
return $factorGraph->getUpdatedRatings();

@ -27,6 +27,14 @@ class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
$this->_TeamDifferencesComparisonLayer = $teamDifferencesComparisonLayer;
}
public function &getLocalFactors()
{
$localFactors =
\array_merge($this->_TeamPerformancesToTeamPerformanceDifferencesLayer->getLocalFactors(),
$this->_TeamDifferencesComparisonLayer->getLocalFactors());
return $localFactors;
}
public function buildLayer()
{
$inputVariablesGroups = &$this->getInputVariablesGroups();