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 in cross validation: missing value where TRUE/FALSE needed #14

Open
niming2 opened this issue Apr 30, 2024 · 2 comments
Open

Error in cross validation: missing value where TRUE/FALSE needed #14

niming2 opened this issue Apr 30, 2024 · 2 comments

Comments

@niming2
Copy link

niming2 commented Apr 30, 2024

Hello,

I used the HMSC-hpc fit the model and then try cross validation:
preds = computePredictedValues (hM =fitSepTF, nParallel = nChains, partition = single_partition)

But I always get an error:
### Cross-validation, fold 1 out of 5
setting updater$GammaEta=FALSE due to absence of random effects included to the model
Error in checkForRemoteErrors(val) :
4 nodes produced errors; first error: missing value where TRUE/FALSE needed

Do you have any idea what happens here?

Thanks,
Ming

@gtikhonov
Copy link
Member

This issue is quite cryptic for me. But currently the computePredictedValues(...) method with behaviour set to execute CV with multiple folds does not use the posterior of the model. Thus, it is expected to be ignorant to whether the model was fitted with Hmsc-HPC or whether it was fitted at all. Have you tried the CV with unfitted model?

@niming2
Copy link
Author

niming2 commented Jul 25, 2024

@gtikhonov Thanks for your response! I am a little confused that CV doesn't use the posterior model - in the function computePredictedValues (), hM requires to to a 'a fitted Hmsc model object'. When I try the unfitted model, it gives the erro: Error in postList[[i]] : subscript out of bounds

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