Questions tagged [rfe]

Recursive Feature Elimination. This algorithm implements backwards selection of predictors based on predictor importance ranking. The predictors are ranked and the less important ones are sequentially eliminated prior to modelling. The goal is to find a subset of predictors that can be used to produce an accurate model.

125 questions
9
votes
1 answer

R caret / How does cross-validation for train within rfe work

I have a question regarding the rfe function from the caret library. On the caret-homepage link they give the following RFE algorithm: algorithm For this example I am using the rfe function with 3-fold cross-validation and the train function with a…
Fabian_G
  • 391
  • 2
  • 13
7
votes
1 answer

Feature Selection in caret rfe + sum with ROC

I have been trying to apply recursive feature selection using caret package. What I need is that ref uses the AUC as performance measure. After googling for a month I cannot get the process working. Here is the code I have…
José Palma
  • 71
  • 1
  • 3
5
votes
2 answers

Target transformation and feature selection in scikit-learn

I am using RFECV for feature selection in scikit-learn. I would like to compare the result of a simple linear model (X,y) with that of a log transformed model (using X, log(y)) Simple Model: RFECV and cross_val_score provide the same result (we…
5
votes
1 answer

Getting features in RFECV scikit-learn

Inspired by this: http://scikit-learn.org/stable/auto_examples/feature_selection/plot_rfe_with_cross_validation.html#sphx-glr-auto-examples-feature-selection-plot-rfe-with-cross-validation-py I am wondering if there is anyway to get the features for…
Javiss
  • 615
  • 1
  • 6
  • 20
5
votes
1 answer

Doing hyperparameter estimation for the estimator in each fold of Recursive Feature Elimination

I am using sklearn to carry out recursive feature elimination with cross-validation, using the RFECV module. RFE involves repeatedly training an estimator on the full set of features, then removing the least informative features, until converging on…
5
votes
1 answer

ValueError using recursive feature elimination for SVM with rbf kernel in scikit-learn

I'm trying to use the recursive feature elimination (RFE) function in scikit-learn but keep getting the error ValueError: coef_ is only available when using a linear kernel. I am trying to perform feature selection for a support vector classifier…
DavidS
  • 1,804
  • 1
  • 14
  • 17
5
votes
1 answer

R package, Caret RFE function, how to customize metric to use AUC?

I want to use AUC as the performance measure, but RFE only support RMSE, RSquared, Accuracy, Kappa. How can I use a customized metric such as auc?
user2684099
  • 53
  • 1
  • 3
4
votes
1 answer

Recursive Feature Elimination on Categorical Data in sklearn?

I have a dataset containing 8 Parameters (4 Continuous 4 Categorical) and I am trying to eliminate features as per RFEC class in Scikit. This is the formula I am using: svc = SVC(kernel="linear") rfecv = RFECV(estimator=svc, step=1,…
Hitesh
  • 43
  • 4
3
votes
0 answers

Using a Pipeline containing ColumnTransformer in SciKit's RFECV

I'm trying to do RFECV on the transformed data using SciKit. For that, I create a pipeline and pass the pipeline to the RFECV. It works fine unless I have ColumnTransformer as a pipeline step. It gives me the following error: ValueError: Specifying…
towi_parallelism
  • 1,269
  • 1
  • 13
  • 28
3
votes
1 answer

How to insert selected variables by RFE into machine learning model in r?

I want to use recursive feature elimination method to select the top features and then put them into machine learning models. I write the code of RFE as library(mlbench) library(caret) control <- rfeControl(functions=rfFuncs, method="cv",…
Helia
  • 245
  • 1
  • 7
3
votes
1 answer

How can I speed up Recursive Feature Elimination on 6,100,000 Features?

I am trying to obtain a ranking of features from a rather large set of features (~6,100,000) in sklearn. Here's the code I have thus far: train, test = train_test_split(rows, test_size=0.2, random_state=310) train, val = train_test_split(train,…
Joe B
  • 712
  • 11
  • 27
3
votes
1 answer

Using sklearn RFE with an estimator from another package

Is it possible to use sklearn Recursive Feature Elimination(RFE) with an estimator from another package? Specifically, I want to use GLM from statsmodels package and wrap it in sklearn RFE? If yes, could you please give some examples?
azuber
  • 197
  • 10
3
votes
0 answers

SVM classification training RFE with caret fails

I'm trying to perform a classification of some raster data with the caret package. With RandomForest everything works fine, I just want to try the SVM classifier, but I get an error. Data is aggregated from different rasters (1x1 km, 50cm resolution…
3
votes
1 answer

Iterative RFE scores sklearn

I'm using RFE with ExtraTreeRegressor as estimator in order to make SupervisedFeatureSelection in a regression problem. I get the ranking and the support from the model with the common code below: rfe_vola = RFE(estimator=ExtraTreesRegressor(),…
LeoCella
  • 285
  • 1
  • 5
  • 18
3
votes
1 answer

Change default arguments of ROC computation (pROC) in the RFE process (caret) - R

I am computing a SVM-RFE model using "ROC" as the metric, with the rfe function (caret package). To my knowledge, the rfe algorithm optimizes the AUC values using the roc function of the pROC package, with its predefined arguments. However, I would…
Rafa OR
  • 299
  • 2
  • 3
  • 7
1
2 3
8 9