PhilBoileau / cvCovEst

An R package for assumption-lean covariance matrix estimation in high dimensions
https://philboileau.github.io/cvCovEst/
Other
13 stars 4 forks source link

Add tests on the values return by the function #49

Closed Marie-PerrotDockes closed 3 years ago

Marie-PerrotDockes commented 3 years ago

Hello,

Their are already many tests available to check your package (nice ;)) but I feel most of them are checking the arguments, and that the functions run without leaving messages or errors but can you add test to check if the value return by the function are the one that are expected ? For instance, for a given seed can you manually check that you find the same empirical_risk than in your function for the different estimators ?

Best,

PhilBoileau commented 3 years ago

Indeed, we have accumulated many tests -- sorry if it was overwhelming! Thank you for your suggestion. While we already have a handful of estimator-specific and loss function tests to verify that they are calculated correctly, we have added a few more tests for our loss functions to verify their accuracy in tests/testthat/test-foldFunctions.R.

Unfortunately, the empirical emprirical_risk column in the risk_df tibble output by cvCovEst() corresponds to the cross-validated risk estimate. We've updated the name of this variable to cv_risk to avoid confusion. However, since this is the cross-validated risk, it is much more difficult to manually verify. Further, this cross-validated risk estimate is computed by the origami package under the hood. We trust that they've tested their package to ensure that these estimates are accurate.

Marie-PerrotDockes commented 3 years ago

OK thank you !