ESL-CN
ESL-CN copied to clipboard
Fig. 18.1
original note: https://esl.hohoweiya.xyz/notes/HighDim/sim18_1/index.html
the figure has not been well reproduced,
here is a shortcoming to separate the note into the webpage
- the inserted code is copied instead of referring, hence it is not proper for continuous integration
now try to put the procedure for reproducing figures into the issues
after rewriting the testing error, the pattern of p = 20
can be reproduced,
p = 100 cannot completely be reproduced, but if adjust the minimum lambda
, then it can also be reproduced,
however, the decreasing trend of p = 1000 can not be well reproduced except that sometimes the mean is indeed decreasing
tried different ways to calculate SNR
- empirical from
Xbeta
- use
var(Xbeta)
formula, as also used in https://cran.r-project.org/web/packages/bestridge/vignettes/An-introduction-to-bestridge.html - treat x individually, as in https://esl.hohoweiya.xyz/03-Linear-Methods-for-Regression/3.3-Subset-Selection/index.html
but the patterns are similar.
tried different SNR levels with the approach beta Sigma beta
, it seems that a low SNR tends to reproduce the decreasing pattern.
also tried different lambdas given SNR = 2, but no changes
julia> run(p = 1000, nrep=100, λs = [0.001, 5000, 10000], snr = 2)
larger p
does not reproduce, either.
julia> run(p = 5000, nrep=100, λs = [0.001, 100, 1000], snr = 2)