mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-01 05:34:00 +00:00
It gets a result... unfortunately it's wrong. But hey, that's progress :) Lots of debugging code left in to make up for a less than ideal debugger
This commit is contained in:
@ -119,8 +119,13 @@ class GaussianWeightedSumFactor extends GaussianFactor
|
||||
|
||||
foreach ($variablesToSum as &$currentVariable)
|
||||
{
|
||||
$this->createVariableToMessageBinding($currentVariable);
|
||||
$localCurrentVariable = &$currentVariable;
|
||||
$this->createVariableToMessageBinding($localCurrentVariable);
|
||||
}
|
||||
|
||||
// DEBUG
|
||||
$selfName = (string)$this;
|
||||
$selfVars = &$this->getVariables();
|
||||
}
|
||||
|
||||
public function getLogNormalization()
|
||||
@ -201,6 +206,8 @@ class GaussianWeightedSumFactor extends GaussianFactor
|
||||
|
||||
public function updateMessageIndex($messageIndex)
|
||||
{
|
||||
// DEBUG
|
||||
$currentFactorName = (string)$this;
|
||||
$allMessages = &$this->getMessages();
|
||||
$allVariables = &$this->getVariables();
|
||||
|
||||
@ -221,6 +228,12 @@ class GaussianWeightedSumFactor extends GaussianFactor
|
||||
$updatedVariables[] = &$allVariables[$indicesToUse[$i]];
|
||||
}
|
||||
|
||||
// DEBUG
|
||||
foreach($allVariables as &$currentVariable)
|
||||
{
|
||||
$currentVarVal = &$currentVariable->getValue();
|
||||
}
|
||||
|
||||
return $this->updateHelper($this->_weights[$messageIndex],
|
||||
$this->_weightsSquared[$messageIndex],
|
||||
$updatedMessages,
|
||||
|
Reference in New Issue
Block a user