def get_p_vals(self, X):
'''
Imputes p-values from the Z-scores of `ScaledFScore` scores. Assuming incorrectly
that the scaled f-scores are normally distributed.
Parameters
----------
X : np.array
Array of word counts, shape (N, 2) where N is the vocab size. X[:,0] is the
positive class, while X[:,1] is the negative class.
Returns
-------
np.array of p-values
'''
f_scores = ScaledFScore.get_scores(X[:,0], X[:,1], self.scaler_algo, self.beta)
z_scores = (f_scores - np.mean(f_scores))/(np.std(f_scores)/np.sqrt(len(f_scores)))
return norm.cdf(z_scores)
ScaledFScoreSignificance.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录