Closes #440 by implementing the suggestion from https://github.com/stan-dev/projpred/issues/440#issuecomment-1683373758. I can confirm that the reprex from https://github.com/stan-dev/projpred/issues/440#issue-1852823375 now runs through on my machine (the same machine that I was using originally for that reprex) and only errors at the end when the projection onto the full model takes place (which is probably due to #323; the error message is Error in if (any(edgevals <- 0 < bdiff & bdiff < boundary.tol)) { :\nmissing value where TRUE/FALSE needed). Running the reprex with nterms_max = 3 and peakRAM::peakRAM() around the varsel() expression (twice; takes long enough) confirms the reduction of peak memory usage:
Closes #440 by implementing the suggestion from https://github.com/stan-dev/projpred/issues/440#issuecomment-1683373758. I can confirm that the reprex from https://github.com/stan-dev/projpred/issues/440#issue-1852823375 now runs through on my machine (the same machine that I was using originally for that reprex) and only errors at the end when the projection onto the full model takes place (which is probably due to #323; the error message is
Error in if (any(edgevals <- 0 < bdiff & bdiff < boundary.tol)) { :\nmissing value where TRUE/FALSE needed
). Running the reprex withnterms_max = 3
andpeakRAM::peakRAM()
around thevarsel()
expression (twice; takes long enough) confirms the reduction of peak memory usage: