Skip to content

Commit

Permalink
DOC explained RFE default behavior in docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller committed Aug 12, 2012
1 parent a93945a commit ba4f3ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sklearn/feature_selection/rfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RFE(BaseEstimator, MetaEstimatorMixin):
Given an external estimator that assigns weights to features (e.g., the
coefficients of a linear model), the goal of recursive feature elimination
(RFE) is to select features by recursively considering smaller and smaller
sets of features. First, the estimator is trained on the initial set of
sets of features. First, the estimator is trained on the initial set of
features and weights are assigned to each one of them. Then, features whose
absolute weights are the smallest are pruned from the current set features.
That procedure is recursively repeated on the pruned set until the desired
Expand All @@ -37,8 +37,9 @@ class RFE(BaseEstimator, MetaEstimatorMixin):
algorithms such as Support Vector Classifiers and Generalized
Linear Models from the `svm` and `linear_model` modules.
n_features_to_select : int
The number of features to select.
n_features_to_select : int or None (default=None)
The number of features to select. If `None`, half of the features
are selected.
step : int or float, optional (default=1)
If greater than or equal to 1, then `step` corresponds to the (integer)
Expand Down

0 comments on commit ba4f3ed

Please sign in to comment.