-
-
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
Collect draw-wise projection warnings and check projection convergence #478
Merged
Conversation
This file contains 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
for checking the convergence of a single submodel fit (not of a whole `outdmin` object).
thrown in case of global option `projpred.warn_submodel_fits` set to `TRUE`.
… fit) to a warning (to avoid that this causes an error; the code should still run through).
…bmodel_fits` and `projpred.check_conv` (these local arguments can be passed to top-level functions like `varsel()`, `cv_varsel()`, and `project()`).
… most complex model.
where tuning parameters may be found (which in turn is achieved by mentioning the class(es) of the submodel fits).
…l posterior draws.
…model to most complex model." Reason for the revert: For example, `class(<gam_fit>)` yields `c("gam", "glm", "lm")`, so it's indeed better to start with the most complex type of model.
…ique `stdout()` output messages as warnings.
(that's why we already needed all those `warn_expected <- "non-integer tests to `warn_prj_drawwise()` and `check_conv()` as well.
`fit_s$mgcv.conv$fully.converged` may be (or perhaps is always) `NULL`.
(to avoid that such a minor issue as a defective convergence checker prevents the code from running through).
…ed.check_conv` (in the general package documentation).
…r the convergence checker.
thrown if the draw-wise divergence minimizer threw only informational messages).
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.
This PR makes projpred catch messages and warnings from the draw-wise divergence minimizers and also check their convergence (as well as possible). Previously, projpred suppressed such messages and warnings and did not check convergence (PRs #259 and #444 started/modified the convergence checker, but it has remained a "hidden"—because unfinished—feature until now).
For deactivating these two features, global options
projpred.warn_prj_drawwise
andprojpred.check_conv
have been added (see theNEWS.md
entries added here).In my opinion, especially the convergence checker is a crucial feature, see, e.g., issue #323. The messages and warnings from the draw-wise divergence minimizers are intended as a help for the user to find out what might be going wrong without having to debug.
The convergence checks for additive models are probably still incomplete, even with this PR. I'll open a new issue for this.
Illustration: