public override void GetArgMaxVOI(MicrosoftResearch.Infer.Distributions.Bernoulli[] activityPosteriors, Marginals priors, out int argMax, out double maxVal)
        {
            CalculateProbabilities(priors);

            var evidences = new Dictionary<int, double>();

            var sortedUnlabelled = Unlabelled
              .OrderBy(_ => rng.NextDouble())
              .OrderBy(uu => Math.Abs(hypothesisActivityPosteriors[uu].GetMean() - 0.5))
              .Take(10)
            ;

            foreach (var index in sortedUnlabelled)
            {
                var evidence = ExpectedEvidence(index, priors);

                evidences.Add(index, evidence);
            }

            var ordered = evidences.OrderBy(ee => ee.Value);
            argMax = ordered.First().Key;
            maxVal = ordered.First().Value;
        }
Exemple #2
0
		private void UpdateDoors(MicrosoftResearch.Infer.Maths.Vector cProbs)
		{
			for (int a = 0; a < 3; a++)
				if (cProbs[a] == 1) { doAnimation("showcarg" + (a + 1)); doAnimation("opendoor" + (a + 1)); }
		}