只需
X, y直接进行意义测试。使用20news和的示例
chi2:
>>> from sklearn.datasets import fetch_20newsgroups_vectorized>>> from sklearn.feature_selection import chi2>>> data = fetch_20newsgroups_vectorized()>>> X, y = data.data, data.target>>> scores, pvalues = chi2(X, y)>>> pvaluesarray([ 4.10171798e-17, 4.34003018e-01, 9.99999996e-01, ..., 9.99999995e-01, 9.99999869e-01, 9.99981414e-01])
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)