Open rodfloripa opened 4 years ago
Trying to run the recursive feature elimination code I'm not able to see the log regression coefficients for all the RFE models created. The code is the following: https://github.com/topepo/FES/blob/master/02_Predicting_Risk_of_Ischemic_Stroke/02_04_Predictive_Modeling_Across_Sets.R
For example, when I run this code:
set.seed(63331) img_int_filtered_rfe <- rfe( img_int_filtered_recipe, data = numericas_train, sizes = 1:nrow(img_int_filtered_recipe$var_info)-1, rfeControl = rfeCtrl, metric = "ROC", ## train options method = "glm", trControl = internal_ctrl ) And type: >img_int_filtered_rfe$fit Thats what I get: Generalized Linear Model 30 samples 1 predictor 2 classes: 'N', 'Y' No pre-processing Resampling: None
Why I can't see the coefficients?
I modified the 'functions' parameter from 'caretFuncs' to 'lrFuncs' and now I get the coefficients.
If you look at the class of that object, it is train. If you use img_int_filtered_rfe$fit$finalModel, you should get the glm model
train
img_int_filtered_rfe$fit$finalModel
glm
Trying to run the recursive feature elimination code I'm not able to see the log regression coefficients for all the RFE models created. The code is the following: https://github.com/topepo/FES/blob/master/02_Predicting_Risk_of_Ischemic_Stroke/02_04_Predictive_Modeling_Across_Sets.R
For example, when I run this code:
Why I can't see the coefficients?
I modified the 'functions' parameter from 'caretFuncs' to 'lrFuncs' and now I get the coefficients.