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

lm varImp does not return all features #858

Closed
omarwagih opened this issue Mar 12, 2018 · 2 comments
Closed

lm varImp does not return all features #858

omarwagih opened this issue Mar 12, 2018 · 2 comments

Comments

@omarwagih
Copy link

@omarwagih omarwagih commented Mar 12, 2018

varImp seems to return one less variable when tuneGrid = expand.grid(intercept = FALSE) is set.
Is this a bug?

To reproduce:

# Train on iris data
mod = train(Petal.Width~., data=iris[,1:4], method='lm', 
                tuneGrid  = expand.grid(intercept = FALSE))

# 3 features + label
head(x$trainingData)

# only 2 features returned
varImp(x)$imp
@hadjipantelis
Copy link
Contributor

@hadjipantelis hadjipantelis commented Apr 10, 2018

Yes, it is/was a bug. Thank you for mentioning it. A PR fixing it has been made.

@topepo
Copy link
Owner

@topepo topepo commented Apr 17, 2018

Closed via #858

@topepo topepo closed this Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.