def estimate_event_probability(self, r, n, p):
# Binomial Event Discriminator
from_timestamp = self.min_timestamp + datetime.timedelta(days=365)
to_timestamp = self.max_timestamp
timestamps, values = self.load_monitor_data(from_timestamp, to_timestamp, None)
values = np.array(values, dtype=float)
prob = math.factorial(n) / (math.factorial(r) * math.factorial(n-r)) * math.pow(p, r) * (math.pow(1-p, n-r))
评论列表
文章目录