Ejemplo n.º 1
0
 def testInferOutcomeUnbiased(self):
     r1 = ProbabilisticRankingFunction(1, self.weights_1)
     r2 = ProbabilisticRankingFunction(1, self.weights_2)
     epi = ExploitativeProbabilisticInterleave("--exploration_rate=0.1")
     outcome = epi.infer_outcome([1, 0, 3, 2], (None, r1, r2), [0, 1, 0, 0],
         self.query)
     self.assertAlmostEquals(0.03581, outcome, 8,
         "Obtained outcome = %.8f" % outcome)
Ejemplo n.º 2
0
 def testInferOutcomeUnbiased(self):
     r1 = ProbabilisticRankingFunction(1, self.weights_1)
     r2 = ProbabilisticRankingFunction(1, self.weights_2)
     epi = ExploitativeProbabilisticInterleave("--exploration_rate=0.1")
     outcome = epi.infer_outcome([1, 0, 3, 2], (None, r1, r2), [0, 1, 0, 0],
                                 self.query)
     self.assertAlmostEquals(0.03581, outcome, 8,
                             "Obtained outcome = %.8f" % outcome)