Added a cv.R and a set of supporting cross-validation functions for more potentially more generalized CV usage in the future. Altered ridge CV to follow this format.
Previously, conducting CV w/ ridge worked as follows:
fit_augsynth_internal -> fit_ridgeaug_formatted -> ... -> choose_lambda, then the result was returned back up the stack.
Now, conducting CV works as follows:
fit_augsynth_internal -> cv_ridge -> fit_ridgeaug_formatted. Here, cv_ridge calls fit_ridgeaug_formatted during cross validation and after $$\lambda$$ is chosen to return the final model.
Added a
cv.R
and a set of supporting cross-validation functions for more potentially more generalized CV usage in the future. Altered ridge CV to follow this format.Previously, conducting CV w/ ridge worked as follows:
fit_augsynth_internal
->fit_ridgeaug_formatted
-> ... -> choose_lambda, then the result was returned back up the stack.Now, conducting CV works as follows:
fit_augsynth_internal
->cv_ridge
->fit_ridgeaug_formatted
. Here,cv_ridge
callsfit_ridgeaug_formatted
during cross validation and after $$\lambda$$ is chosen to return the final model.