def before_call(self, b, split_idx): super().before_call(b, split_idx) self.loss_pct = random.uniform(0, self.max_loss_pct)
def before_call(self, b, split_idx): super().before_call(b, split_idx) self.shift_factor = random.uniform(-1, 1) if self.direction != 0: self.shift_factor = self.direction * abs(self.shift_factor)
def before_call(self, b, split_idx): super().before_call(b, split_idx) self.gain = random.uniform(self.lower, self.upper)