shuiliunian
shuiliunian
```python def counts_to_trials(count_methyl: int, count_canonical: int) -> List[bool]: return [True] * count_methyl + [False] * count_canonical class BernoulliData: def __init__(self, data: List[bool]): self.data = data def counts(self) -> Tuple[int, int]:...
yes, By the way, why does the likelihood ratio ignore the combinatorial number, and if the likelihood ratio no longer works correctly after adding the combinatorial number.
```python def beta_binom_log_marginal(X, n): alpha_prior = 0.5 beta_prior = 0.5 if n == 0: return 0.0 # 无数据时边际似然为1,对数为0 log_comb = gammaln(n + 1) - gammaln(X + 1) - gammaln(n -...