Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c0a328

Browse filesBrowse files
glemaitrejjerphanogrisel
committed
DOC Adds consistence in docs for univariate selection metrics (scikit-learn#19904)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
1 parent ca19431 commit 7c0a328
Copy full SHA for 7c0a328

File tree

1 file changed

+15
-14
lines changed
Filter options

1 file changed

+15
-14
lines changed

‎sklearn/feature_selection/_univariate_selection.py

Copy file name to clipboardExpand all lines: sklearn/feature_selection/_univariate_selection.py
+15-14Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ def f_oneway(*args):
5151
5252
Parameters
5353
----------
54-
*args : array-like, sparse matrices
54+
*args : {array-like, sparse matrix}
5555
sample1, sample2... The sample measurements should be given as
5656
arguments.
5757
5858
Returns
5959
-------
60-
F-value : float
60+
f_statistic : float
6161
The computed F-value of the test.
62-
p-value : float
62+
p_value : float
6363
The associated p-value from the F-distribution.
6464
6565
Notes
@@ -127,19 +127,19 @@ def f_classif(X, y):
127127
128128
Parameters
129129
----------
130-
X : {array-like, sparse matrix} shape = [n_samples, n_features]
130+
X : {array-like, sparse matrix} of shape (n_samples, n_features)
131131
The set of regressors that will be tested sequentially.
132132
133-
y : array of shape(n_samples)
134-
The data matrix.
133+
y : ndarray of shape (n_samples,)
134+
The target vector.
135135
136136
Returns
137137
-------
138-
F : array, shape = [n_features,]
139-
The set of F values.
138+
f_statistic : ndarray of shape (n_features,)
139+
F-statistic for each feature.
140140
141-
pval : array, shape = [n_features,]
142-
The set of p-values.
141+
p_values : ndarray of shape (n_features,)
142+
P-values associated with the F-statistic.
143143
144144
See Also
145145
--------
@@ -195,10 +195,11 @@ def chi2(X, y):
195195
196196
Returns
197197
-------
198-
chi2 : array, shape = (n_features,)
199-
chi2 statistics of each feature.
200-
pval : array, shape = (n_features,)
201-
p-values of each feature.
198+
chi2 : ndarray of shape (n_features,)
199+
Chi2 statistics for each feature.
200+
201+
p_values : ndarray of shape (n_features,)
202+
P-values for each feature.
202203
203204
Notes
204205
-----

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.