Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from sklearn.feature_selection import RFE
  2. from sklearn.linear_model import LogisticRegression
  3. #Recursive feature elimination method, returning the data after feature selection
  4. #Parameter estimator is the base model
  5. #Parameter n_features_to_select is the number of features selected
  6. RFE(estimator=LogisticRegression(),n_features_to_select=2).fit_transform(iris.data, iris.target)
Add Comment
Please, Sign In to add comment