ITMO_FS.filters.univariate
.chi2_measure¶
-
ITMO_FS.filters.univariate.
chi2_measure
(X, y)¶ Calculates score for the test chi-squared statistic from X. Chi-squared test is a statistical hypothesis test that is valid to perform when the test statistic is chi-squared distributed under the null hypothesis
Note: Input data must contain only non-negative features such as booleans or frequencies (e.g., term counts in document classification), relative to the classes.
Parameters: - X (numpy array, shape (n_samples, n_features)) – The input samples.
- y (numpy array, shape (n_samples, )) – The classes for the samples.
Returns: Return type: Score for each feature as a numpy array, shape (n_features, )
See also
https()
- //en.wikipedia.org/wiki/Chi-squared_test
Examples