Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

02_Predicting_Risk_of_Ischemic_Stroke- Coefficients for RFE model #96

Open
rodfloripa opened this issue Sep 24, 2020 · 1 comment
Open

Comments

@rodfloripa
Copy link

rodfloripa commented Sep 24, 2020

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.

@topepo
Copy link
Owner

topepo commented Sep 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants