mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-30 04:34:16 +00:00
Tenative pass at getting prior layer working. Found out about division by zero and closure differences.
This commit is contained in:
@ -31,7 +31,7 @@ abstract class GaussianFactor extends Factor
|
||||
|
||||
public function createVariableToMessageBinding(Variable &$variable)
|
||||
{
|
||||
return parent::createVariableToMessageBinding($variable,
|
||||
return parent::createVariableToMessageBindingWithMessage($variable,
|
||||
new Message(
|
||||
GaussianDistribution::fromPrecisionMean(0, 0),
|
||||
"message from {0} to {1}", $this));
|
||||
|
@ -23,11 +23,11 @@ class GaussianPriorFactor extends GaussianFactor
|
||||
{
|
||||
parent::__construct("Prior value going to {0}");
|
||||
$this->_newMessage = new GaussianDistribution($mean, sqrt($variance));
|
||||
$this->createVariableToMessageBinding($variable,
|
||||
new Message(
|
||||
GaussianDistribution::fromPrecisionMean(0, 0),
|
||||
$newMessage = new Message(GaussianDistribution::fromPrecisionMean(0, 0),
|
||||
"message from {0} to {1}",
|
||||
$this, variable));
|
||||
$this, $variable);
|
||||
|
||||
$this->createVariableToMessageBindingWithMessage($variable, $newMessage);
|
||||
}
|
||||
|
||||
protected function updateMessageVariable(Message &$message, Variable &$variable)
|
||||
|
Reference in New Issue
Block a user