Beispiel #1
0
 def draw_parameter(self, random):
     return self.Parameter(
         p_hour=dist.uniform_float(random, 0, 1),
         p_minute=dist.uniform_float(random, 0, 1),
         p_second=dist.uniform_float(random, 0, 1),
         month=dist.non_empty_subset(random, list(range(1, 13))),
         naive_chance=dist.uniform_float(random, 0, 0.5),
         timezones=self.timezones and dist.non_empty_subset(random, self.timezones),
     )
Beispiel #2
0
 def draw_parameter(self, random):
     return self.Parameter(
         p_hour=dist.uniform_float(random, 0, 1),
         p_minute=dist.uniform_float(random, 0, 1),
         p_second=dist.uniform_float(random, 0, 1),
         month=dist.non_empty_subset(random, list(range(1, 13))),
         naive_chance=dist.uniform_float(random, 0, 0.5),
         timezones=self.timezones
         and dist.non_empty_subset(random, self.timezones),
     )
Beispiel #3
0
 def produce_parameter(self, random):
     return self.Parameter(
         p_hour=dist.uniform_float(random, 0, 1),
         p_minute=dist.uniform_float(random, 0, 1),
         p_second=dist.uniform_float(random, 0, 1),
         month=dist.non_empty_subset(random, list(range(1, 13))),
         naive_chance=dist.uniform_float(random, 0, 0.5),
         utc_chance=dist.uniform_float(random, 0, 1),
         timezones=dist.non_empty_subset(
             random, list(map(pytz.timezone, pytz.all_timezones))),
         naive_options=dist.non_empty_subset(random, self.naive_options))
Beispiel #4
0
 def produce_parameter(self, random):
     return self.Parameter(
         p_hour=dist.uniform_float(random, 0, 1),
         p_minute=dist.uniform_float(random, 0, 1),
         p_second=dist.uniform_float(random, 0, 1),
         month=dist.non_empty_subset(random, list(range(1, 13))),
         naive_chance=dist.uniform_float(random, 0, 0.5),
         utc_chance=dist.uniform_float(random, 0, 1),
         timezones=dist.non_empty_subset(
             random,
             list(
                 map(pytz.timezone, pytz.all_timezones))
         ),
         naive_options=dist.non_empty_subset(random,
                                             self.naive_options
                                             )
     )
Beispiel #5
0
 def draw_parameter(self, random):
     return self.Parameter(
         leaf_parameter=self.leaf_strategy.draw_parameter(random),
         branch_key_parameter=self.branch_key_strategy.draw_parameter(
             random),
         branch_label_parameter=self.branch_label_strategy.draw_parameter(
             random),
         branch_factor=uniform_float(random, 0.75, 0.99),
     )
Beispiel #6
0
 def draw_parameter(self, random):
     return self.Parameter(
         leaf_parameter=self.leaf_strategy.draw_parameter(random),
         branch_key_parameter=self.branch_key_strategy.draw_parameter(
             random),
         branch_label_parameter=self.branch_label_strategy.draw_parameter(
             random),
         branch_factor=uniform_float(random, 0.75, 0.99),
     )
Beispiel #7
0
 def draw_parameter(self, random):
     return self.Parameter(
         negative_probability=dist.uniform_float(random, 0, 1),
         subnormal_probability=dist.uniform_float(random, 0, 0.5),
     )
Beispiel #8
0
 def produce_parameter(self, random):
     return self.Parameter(
         negative_probability=dist.uniform_float(random, 0, 1),
         subnormal_probability=dist.uniform_float(random, 0, 0.5),
     )
Beispiel #9
0
 def produce_parameter(self, random):
     return self.Parameter(
         negative_probability=dist.uniform_float(random, 0, 1),
         min_exponent=random.randint(0, self.max_exponent)
     )
Beispiel #10
0
 def produce_parameter(self, random):
     return self.Parameter(
         negative_probability=dist.uniform_float(random, 0, 1),
         min_exponent=random.randint(0, self.max_exponent)
     )