def _func(self, x, size, ext_size, width):
obs = pd.np.array(
[[x.freq1, x.freq2],
[size - x.freq1 * width, ext_size - x.freq2 * width]])
try:
tmp = stats.chi2_contingency(obs,
lambda_="log-likelihood")
except ValueError as e:
print(e)
return pd.np.nan
return tmp[0]
评论列表
文章目录