示例#1
0
    def get_arms(arm_count, tape_size):
        true_means = rvh.get_uniform_sample(0, 1, arm_count)
        arms = []
        for i in range(arm_count):
            arm = Arm(true_means[i], size=tape_size)
            arms.append(arm)

        return true_means, arms
示例#2
0
    def test_library_random_variables(self):

        # Uniform distribution
        result_1 = rvh.get_uniform_sample(0, 1, 10)

        # Bernoulli distribution
        result_2 = rvh.get_bernoulli_sample(0.8)

        result_3 = rvh.get_bernoulli_sample(p=0.5, size=10)

        a = 5