getInputVariablesGroups(); $outputVariablesGroups = &$this->getOutputVariablesGroups(); foreach ($inputVariablesGroups as &$currentTeam) { $currentTeamPlayerPerformances = array(); foreach ($currentTeam as $playerSkillVariable) { $playerPerformance = $this->createOutputVariable($playerSkillVariable->getKey()); $newLikelihoodFactor = $this->createLikelihood($playerSkillVariable, $playerPerformance); $this->addLayerFactor($newLikelihoodFactor); $currentTeamPlayerPerformances[] = $playerPerformance; } $outputVariablesGroups[] = $currentTeamPlayerPerformances; } } private function createLikelihood(KeyedVariable &$playerSkill, KeyedVariable &$playerPerformance) { return new GaussianLikelihoodFactor(square($this->getParentFactorGraph()->getGameInfo()->getBeta()), $playerPerformance, $playerSkill); } private function createOutputVariable(&$key) { return $this->getParentFactorGraph()->getVariableFactory()->createKeyedVariable($key, $key . "'s performance"); } public function createPriorSchedule() { $localFactors = &$this->getLocalFactors(); return $this->scheduleSequence( array_map( function($likelihood) { return new ScheduleStep("Skill to Perf step", $likelihood, 0); }, $localFactors), "All skill to performance sending"); } public function createPosteriorSchedule() { $localFactors = &$this->getLocalFactors(); return $this->scheduleSequence( array_map( function($likelihood) { return new ScheduleStep("name", $likelihood, 1); }, $localFactors), "All skill to performance sending"); } } ?>