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

error occurs during training #39

Open
zkkao opened this issue Jan 12, 2022 · 4 comments
Open

error occurs during training #39

zkkao opened this issue Jan 12, 2022 · 4 comments

Comments

@zkkao
Copy link

zkkao commented Jan 12, 2022

Dear Authors:

I use R version 4.1.2 and run commands line by line in the script of Qoala_T_B_subset_based_github.R. An error occurs during training step:

rf.tune = train(y=training$Rating,
x=subset(training, select=-c(Rating)),
method = "rf",
metric = "ROC",
trControl = ctrl,
ntree = 501,
tuneGrid=expand.grid(mtry = c(8)),
verbose=FALSE)

and the error message is:

Error in apply(testOutput[, lev], 1, function(x) x/sum(x)) :
dim(X) must have a positive length
Calls: train -> train.default -> evalSummaryFunction -> t -> apply
Execution halted

Is there any suggestion?

@larawierenga
Copy link
Collaborator

larawierenga commented Jan 12, 2022 via email

@zkkao
Copy link
Author

zkkao commented Jan 13, 2022

Hi Lara,
I have confirm that there isn't any missing value in rating column. And training set include all data and columns. The dimension of my training set is [79, 186]. The version of caret is 6.0-90. Can you give some advise.

@larawierenga
Copy link
Collaborator

larawierenga commented Jan 17, 2022 via email

@zkkao
Copy link
Author

zkkao commented Jan 18, 2022

Hi Lara,
The MRI data was processed by Freesurfer v7.1.1.

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