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

Collect draw-wise projection warnings and check projection convergence #478

Merged
merged 46 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
55f23c7
Move code from `check_conv()` out into a stand-alone helper function
fweber144 Nov 7, 2023
2cf3db9
Make the `check_conv()` warning more general.
fweber144 Nov 7, 2023
3a2c8a3
Fix a comment in `check_conv_s()`.
fweber144 Nov 15, 2023
b41a4f0
Enhance `check_conv_s()` in case of an additive multilevel (GAMM) sub…
fweber144 Nov 7, 2023
77b5183
Enhance `check_conv_s()` in case of an additive (GAM) submodel.
fweber144 Nov 7, 2023
40b303a
Turn the `stdout()` output from `glm_ridge()` and `glm_elnet()` into …
fweber144 Nov 7, 2023
ffe961b
Use `capt_mssgs_warns()` in `divmin()`.
fweber144 Nov 14, 2023
3abb890
Throw warnings like `"Warning in foo() : some warning starting here:"`.
fweber144 Nov 15, 2023
6ef0cbe
Don't use `try()` where not necessary.
fweber144 Nov 15, 2023
fdad1fd
Check messages and warnings on a draw-by-draw basis.
fweber144 Nov 15, 2023
71bda6d
Allow re-use of object `mssgs_warns_capts` and enhance the warning
fweber144 Nov 15, 2023
c5cf96a
`check_conv_s()`: Turn the error (in case of an unrecognized submodel…
fweber144 Nov 15, 2023
f13f177
Use a default of `TRUE` for global option `projpred.check_conv`.
fweber144 Nov 7, 2023
3efdd68
Move the `check_conv()` call to `divmin()`.
fweber144 Nov 15, 2023
5e95b72
Move option `projpred.check_conv` into `check_conv()`.
fweber144 Nov 15, 2023
7e21049
Return `NULL` consistently (see `warn_pareto()`).
fweber144 Nov 15, 2023
f8b42db
Create function `warn_submodel_fits()`.
fweber144 Nov 15, 2023
b86982c
Add local arguments corresponding to global options `projpred.warn_su…
fweber144 Nov 15, 2023
9fd72c7
Adapt `divmin_augdat()` analogously to `divmin()`.
fweber144 Nov 15, 2023
313ac99
`check_conv_s()`: Enhance a comment for `subfit`s.
fweber144 Nov 7, 2023
01830f0
`check_conv_s()`: Re-order the `if` cases from least complex model to…
fweber144 Nov 15, 2023
8446064
Enhance the warning in `check_conv()` by giving a more precise hint
fweber144 Nov 15, 2023
efed1dd
Filter out some warnings also in `divmin()`.
fweber144 Nov 15, 2023
b6e5ef7
Tests: Remove unnecessary braces.
fweber144 Nov 15, 2023
13a1958
Tests: Use the global option to suppress warnings collected across al…
fweber144 Nov 15, 2023
5ad503d
Tests: Don't use the convergence checker.
fweber144 Nov 15, 2023
d55b66f
Revert "`check_conv_s()`: Re-order the `if` cases from least complex …
fweber144 Nov 16, 2023
60aa9fb
Extend `check_conv_s()` to `polr` fits.
fweber144 Nov 16, 2023
ca247dd
Extend `check_conv_s()` to `clmm` fits.
fweber144 Nov 16, 2023
24477ca
Extend `check_conv_s()` to `multinom` fits.
fweber144 Nov 16, 2023
c9e6650
Extend `check_conv_s()` to `mmblogit` fits.
fweber144 Nov 16, 2023
6a7a5e5
`search_L1_surrogate()` and `fit_glm_ridge_callback()`: Only throw un…
fweber144 Nov 17, 2023
d8f5585
L1 search: Enhance the warning message.
fweber144 Nov 17, 2023
29ec582
`warn_submodel_fits()`: Fix the warning message.
fweber144 Nov 17, 2023
08302f3
Replace all occurrences of `warn_submodel_fits` by `warn_prj_drawwise`.
fweber144 Nov 17, 2023
94e7a31
Minor enhancements for `warn_prj_drawwise()`.
fweber144 Nov 17, 2023
e0426c1
Tests: testthat handles `stderr()` in its own way
fweber144 Nov 21, 2023
9643525
The tests revealed that for GAMs with the binomial family,
fweber144 Nov 21, 2023
cb0cf84
fixup! Tests: testthat handles `stderr()` in its own way
fweber144 Nov 21, 2023
b769378
`fit_glmer_callback()`: Avoid the lme4 warning `unused control argume…
fweber144 Nov 21, 2023
b51fcfe
Tests: Unfortunately, we need to suppress warnings.
fweber144 Nov 21, 2023
ef20193
Catch errors when calling `check_conv_s()` and throw a warning instead
fweber144 Nov 22, 2023
49e24e0
Fix the warning message from `warn_prj_drawwise()`.
fweber144 Nov 22, 2023
6fab7c5
Docs: Mention global options `projpred.warn_prj_drawwise` and `projpr…
fweber144 Nov 22, 2023
c6a3b5e
Add `NEWS.md` entries for the collection of draw-wise warnings and fo…
fweber144 Nov 22, 2023
ab6544e
Formulate `check_conv()`'s warning more cautiously (because it is also
fweber144 Nov 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ If you read this from a place other than <https://mc-stan.org/projpred/news/inde
* `print.vselsummary()` (and hence also `print.vsel()`) now prints the reference model's performance evaluation results as well (not just those of the submodels). Correspondingly, a new helper function `performances()` has been added which allows to access the reference model's (as well as the submodels') performance evaluation results. (GitHub: #471)
* Argument `solution_terms` of `project()` has been deprecated. Please use the new argument `predictor_terms` instead. (GitHub: #472)
* For expert users of the augmented-data projection only: Objects of class `augmat` or `augvec` do not need to have an attribute called `nobs_orig` anymore, but a new attribute called `ndiscrete`, giving the number of (possibly latent) response categories instead of the number of observations (see `` ?`augdat-internals` ``). This simplifies the subsetting of such objects. (GitHub: #473)
* By default, **projpred** now catches messages and warnings from the draw-wise divergence minimizers and throws their unique collection after performing all draw-wise divergence minimizations (i.e., draw-wise projections). This can be deactivated by setting global option `projpred.warn_prj_drawwise` to `FALSE`. Previously, **projpred** suppressed such messages and warnings. (GitHub: #478)
* By default, **projpred** now checks the convergence of the draw-wise divergence minimizers and throws a warning in case of potential convergence problems. This can be deactivated by setting global option `projpred.check_conv` to `FALSE`. (GitHub: #478)

## Minor changes

Expand Down
Loading