Update "body fat" to projpred v2.8.0#6
Open
fweber144 wants to merge 12 commits intoavehtari:masterfrom
Open
Conversation
experimental in projpred (see stan-dev/projpred#94). Setting `nloo = n` should not change results compared to omitting argument `nloo`, but I guess it's better not to point to an experimental feature where not needed.
projpred v2.1.0 back to the matrix that `fitrhs_cvvs[["pct_solution_terms_cv"]]` delivered before.
``` Warning message: Continuous limits supplied to discrete scale. Did you mean `limits = factor(...)` or `scale_*_continuous()`? ```
…s not need to be set after a call to `set.seed()`, but I add it here so that the `cv_varsel()` command can be re-run easily without having to re-run all the code from the previous `set.seed()` call on).
introduces a "TODO" with respect to `nloo`.
introduces a "TODO" with respect to `nloo`.
implemented in projpred. This resolves the `nloo` "TODO" added earlier.
implemented in projpred. This resolves the `nloo` "TODO" added earlier.
Author
|
PR stan-dev/projpred#471 implements what was missing for lines https://github.com/fweber144/modelselection/blob/9e65616c6bf9e234747b2e97a3f602cb5c264c92/bodyfat_kfoldcv.R#L29-L32. If I have the time, I can try to make use of the new |
Changes not related to projpred v2.8.0: 1) Object `df` (files `bodyfat_bootstrap.R`, `bodyfat_kfoldcv.R`, and `bodyfat_kfoldcv2.R`) is modified for consistency with file `bodyfat.Rmd`. 2) Objects consisting of a model formula are coerced to `formula`s because otherwise, `projpred:::get_refmodel.stanreg()` throws an error.
Author
Done now in commit 1f010f1 (with projpred 2.8.0 which has just been released on CRAN). See the commit message of that commit for some more details. |
Owner
|
Uh, I never received any notification about this. I'll check this in next couple weeks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following upon stan-dev/projpred#311, this PR shows how to adapt the "body fat" case study code so that it can be used with the most recent CRAN version of projpred (v2.1.1). Note that I did not run the code from
bodyfat_bootstrap.R,bodyfat_kfoldcv.R, andbodyfat_kfoldcv2.Rbecause they are probably going to take very long. For the same reason, I also did not run the secondcv_varsel()call inbodyfat.Rmd. I also only looked at the "body fat" case study. Other case studies probably have to be adapted, too.I also noticed uses of
nlooinbodyfat_kfoldcv.Randbodyfat_kfoldcv2.Rwhich were probably not doing what they were supposed to. I now switched to projpred's natively supported K-fold CV because I guess that's what those lines were supposed to do.See the commit messages for details, but feel free to ask if you need more information.