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

Caret mvrValstats Error Message #848

Closed
jahneldardavik opened this issue Mar 1, 2018 · 3 comments
Closed

Caret mvrValstats Error Message #848

jahneldardavik opened this issue Mar 1, 2018 · 3 comments

Comments

@jahneldardavik
Copy link

@jahneldardavik jahneldardavik commented Mar 1, 2018

I try to run caret, but get an error messge:
Error in mvrValstats(object = object, estimate = "train") :
could not find function "mvrValstats"

Here is what I do:

arcene <- read.table('http://archive.ics.uci.edu/ml/machine-learning-databases/arcene/ARCENE/arcene_train.data', sep =' ',colClasses = c(rep('numeric',10000),'NULL'))
#head(arcene)
#dim(arcene)
#head[1:4, 1:20]
str(arcene)
arcene$class <- factor(scan('https://archive.ics.uci.edu/ml/machine-learning-databases/arcene/ARCENE/arcene_train.labels', sep = '\t'))

any(is.na(arcene))

set.seed(100)
myfolds <- createMultiFolds(arcene$class, k = 5, times = 10)
control <- trainControl('repeatedcv', index = myfolds, selectionFunction = 'oneSE')

mod1 <- train(class ~ ., data = arcene, method = 'pls', metric = 'Accuracy', tuneLength = 20, trControl = control, preProc = c('zv','center','scale'))
plot(mod1)
plot(varImp(mod1),10, main = 'PLS')

The last plot statement results in this error message:
Error in mvrValstats(object = object, estimate = "train") :
could not find function "mvrValstats"

Advice is greatly appreciated.

Thank you
jahn davik

@topepo
Copy link
Owner

@topepo topepo commented Mar 1, 2018

It is a bug that I'll fix in the upcoming release. In the meantime, load the pls package before computing the importances.

topepo added a commit that referenced this issue Mar 2, 2018
@jahneldardavik
Copy link
Author

@jahneldardavik jahneldardavik commented Mar 2, 2018

@topepo
Copy link
Owner

@topepo topepo commented Mar 2, 2018

No need to change versions. Just load the pls package before you do the importance calculations.

@topepo topepo closed this Mar 4, 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
2 participants
You can’t perform that action at this time.