Ejemplo n.º 1
0
        public override void BuildLayer()
        {
            foreach (var currentTeam in InputVariablesGroups)
            {
                Variable <GaussianDistribution> teamPerformance = CreateOutputVariable(currentTeam);
                AddLayerFactor(CreatePlayerToTeamSumFactor(currentTeam, teamPerformance));

                // REVIEW: Does it make sense to have groups of one?
                OutputVariablesGroups.Add(new[] { teamPerformance });
            }
        }
        public override void BuildLayer()
        {
            for (int i = 0; i < InputVariablesGroups.Count - 1; i++)
            {
                Variable <GaussianDistribution> strongerTeam = InputVariablesGroups[i][0];
                Variable <GaussianDistribution> weakerTeam   = InputVariablesGroups[i + 1][0];

                Variable <GaussianDistribution> currentDifference = CreateOutputVariable();
                AddLayerFactor(CreateTeamPerformanceToDifferenceFactor(strongerTeam, weakerTeam, currentDifference));

                // REVIEW: Does it make sense to have groups of one?
                OutputVariablesGroups.Add(new[] { currentDifference });
            }
        }
        public override void BuildLayer()
        {
            foreach (var currentTeam in InputVariablesGroups)
            {
                var currentTeamPlayerPerformances = new List <KeyedVariable <TPlayer, GaussianDistribution> >();

                foreach (var playerSkillVariable in currentTeam)
                {
                    KeyedVariable <TPlayer, GaussianDistribution> playerPerformance =
                        CreateOutputVariable(playerSkillVariable.Key);
                    AddLayerFactor(CreateLikelihood(playerSkillVariable, playerPerformance));
                    currentTeamPlayerPerformances.Add(playerPerformance);
                }

                OutputVariablesGroups.Add(currentTeamPlayerPerformances);
            }
        }
Ejemplo n.º 4
0
        public override void BuildLayer()
        {
            foreach (var currentTeam in _Teams)
            {
                var currentTeamSkills = new List <KeyedVariable <TPlayer, GaussianDistribution> >();

                foreach (var currentTeamPlayer in currentTeam)
                {
                    KeyedVariable <TPlayer, GaussianDistribution> playerSkill =
                        CreateSkillOutputVariable(currentTeamPlayer.Key);
                    AddLayerFactor(CreatePriorFactor(currentTeamPlayer.Key, currentTeamPlayer.Value, playerSkill));
                    currentTeamSkills.Add(playerSkill);
                }

                OutputVariablesGroups.Add(currentTeamSkills);
            }
        }