PatientLevelPrediction icon indicating copy to clipboard operation
PatientLevelPrediction copied to clipboard

Default initialRidgeVariance for iterative hard thresholding too large

Open MathildeTans opened this issue 2 years ago • 1 comments

Describe the bug The default value for the variable 'initialRidgeVariance' (part of iterative hard thresholding) is too large and can cause inability to converge if it is not set properly. I have tried to commit the required edit, but I did not have access.

Set up (please run in R "sessionInfo()" and copy the output here): R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] Rcpp_1.0.6 Andromeda_0.4.0 rstudioapi_0.13 DatabaseConnector_3.0.0 magrittr_2.0.1 tidyselect_1.1.0
[7] bit_4.0.4 FeatureExtraction_3.1.0 R6_2.5.0 rlang_0.4.10 blob_1.2.1 dplyr_1.0.3
[13] tools_4.0.3 DBI_1.1.1 SqlRender_1.6.8 ellipsis_0.3.1 assertthat_0.2.1 bit64_4.0.5
[19] digest_0.6.27 tibble_3.0.5 lifecycle_0.2.0 crayon_1.3.4 rJava_0.9-13 purrr_0.3.4
[25] ParallelLogger_3.0.0 vctrs_0.3.6 zeallot_0.1.0 memoise_1.1.0 glue_1.4.2 RSQLite_2.2.2
[31] PatientLevelPrediction_4.3.10 compiler_4.0.3 pillar_1.4.7 generics_0.1.0 jsonlite_1.7.2 pkgconfig_2.0.3

To Reproduce In CyclopsSettins.R, function 'setIterativeHardThresholding', the initialRidgeVariance has default value 1000. I advise changing this to 0.1. This is on line 190.

PLP Log File N/A

Additional context I should note that I deduced that it should be 0.1 instead of 1000 using just one PLP model. It might be different for other problems. I would recommend changing it since an initialRidgeVariance of 1000 is likely to be too large. But I would also keep in mind that there might be a better default value for this variable.

MathildeTans avatar May 17 '22 16:05 MathildeTans

Thanks for figuring this out! To make the edit you can fork PLP (develop branch) to your own repositories and then make a pull request into develop from your fork. I'll mark this as a good first commit.

jreps avatar Aug 03 '22 01:08 jreps