-
-
Notifications
You must be signed in to change notification settings - Fork 25
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 when getting reference model with k-fold cross validation for cv_varsel #485
Comments
Yes, this is a known issue with the deprecated structure of |
Closing now since this was fixed by commit b5bdc31. |
Thanks a lot! Changing the code to
as suggested by the commit fixed the issue. A Running the search using the full dataset ...
|
I would need a reprex for this |
Here is the one from above with the changes to the cvfits structure:
|
You do not specify |
In any case, you may also use |
Thanks for pointing me in the right direction! Code below now works for those interested. Following Frank's advice I created the cvfits object with the function run_cvfun(). To provide an alternative approach based on my original code, I also had another look at the structure required for the cvfits object. Since I am working with custom stratified cross validation folds, the second approach is more flexible than using run_cvfun(). Though I am not sure whether custom CV folds can also be created with run_cvfun() or alternative functions.
|
This was implemented in #480 and hence will also be included in the upcoming CRAN release (if you need this feature until that CRAN release is completed, you can use the GitHub version): Line 33 in 1bce71e
Btw, |
I am revisiting a snippet of code in my analysis that used to work with previous versions of brms and projpred (Projpred Issue #328, and on a different machine after making switch from Windows to Mac.
My work flow with reprex below is:
The syntax used here for specifying a custom k-fold cv ref model is also shown in #1286
When running cv_varsel() I get the following error message:
"in family$linkinv(pred_sub) :
Argument eta must be a nonempty numeric vector
In addition: Warning message:
In parse_args_cv_varsel(refmodel = refmodel, cv_method = cv_method, :
The content of
cvfits
's sub-list calledfits
should be moved one level up (and elementfits
removed). The old structure will continue to work for a while, but is deprecated."I would appreciate any help with understanding the main error message and also with how to set the ref model correctly now.
Thanks for your help!
Andreas
Also posted as issue on brms github page #1572
The text was updated successfully, but these errors were encountered: