mirror of
https://github.com/furyfire/trueskill.git
synced 2025-01-15 17:37:39 +00:00
Checkpoint before another reference pass
This commit is contained in:
@ -49,8 +49,8 @@ abstract class Factor
|
||||
public function updateMessageIndex($messageIndex)
|
||||
{
|
||||
Guard::argumentIsValidIndex($messageIndex, count($this->_messages), "messageIndex");
|
||||
$message = $this->_messages[$messageIndex];
|
||||
$variable = $this->_messageToVariableBinding->getValue($this->_messages[$messageIndex]);
|
||||
$message = &$this->_messages[$messageIndex];
|
||||
$variable = &$this->_messageToVariableBinding->getValue($this->_messages[$messageIndex]);
|
||||
return $this->updateMessageVariable($message, $variable);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class GaussianGreaterThanFactor extends GaussianFactor
|
||||
$epsilsonTimesSqrtC = $this->_epsilon*$sqrtC;
|
||||
$d = $messageFromVar->getPrecisionMean();
|
||||
|
||||
$denom = 1.0 - TruncatedGaussianCorrectionFunctions::vExceedsMargin($dOnSqrtC, $epsilsonTimesSqrtC);
|
||||
$denom = 1.0 - TruncatedGaussianCorrectionFunctions::wExceedsMargin($dOnSqrtC, $epsilsonTimesSqrtC);
|
||||
|
||||
$newPrecision = $c/$denom;
|
||||
$newPrecisionMean = ($d +
|
||||
|
@ -218,8 +218,8 @@ class GaussianWeightedSumFactor extends GaussianFactor
|
||||
$allMessagesCount = count($allMessages);
|
||||
for ($i = 0; $i < $allMessagesCount; $i++)
|
||||
{
|
||||
$updatedMessages[] =$allMessages[$indicesToUse[$i]];
|
||||
$updatedVariables[] = $allVariables[$indicesToUse[$i]];
|
||||
$updatedMessages[] = &$allMessages[$indicesToUse[$i]];
|
||||
$updatedVariables[] = &$allVariables[$indicesToUse[$i]];
|
||||
}
|
||||
|
||||
return $this->updateHelper($this->_weights[$messageIndex],
|
||||
|
Reference in New Issue
Block a user