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

Refactors (warning for cv_search, solution_terms, term fit) #263

Merged

Conversation

fweber144
Copy link
Collaborator

This mainly:

See the commit messages for details.

this is a bit unsafe (due to the existence of *function* `solution_terms()` which can give, for example, `length(solution_terms) == 1` even if no local object `solution_terms` exists, which was one of the reasons for issue stan-dev#173).
… should be thrown by

the corresponding `predict()` method. All pre-defined `predict()` methods should perform such a check, so only `predict.subfit()` needs to be adapted. The corresponding warning in `proj_helper()` can therefore be removed, which also avoids a definition of a `solution_terms` object which is a bit unsafe (due to the existence of *function* `solution_terms()`). Besides, also move (and modify) a related test from `test_proj_pred.R` to `test_project.R` which is more appropriate there.
the plural is more appropriate and because in `subprd()`, there are two objects called `fit`).
submodel may (and usually will) consist of several fits, namely one per several
projected draw. Furthermore, `sub_fit` may be confounded too easily with objects
of class `subfit` (which are model fit objects based on `glm_ridge()` or
`glm_elnet()`). The name "submodl" was chosen because it is currently unused,
avoids any reference to the term "fit", and has the same number of characters as
`sub_fit` (which makes replacement easier since no reflows and re-indentations
are required).
@AlejandroCatalina AlejandroCatalina merged commit d20b542 into stan-dev:develop Jan 8, 2022
@fweber144 fweber144 deleted the cvsearchwarn_solterms_subfits branch January 8, 2022 18:07
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

Successfully merging this pull request may close these issues.

None yet

2 participants