zdk123 / pulsar

pulsar: Parallel Utilities for Lambda Selection along a Regularization Path
GNU General Public License v3.0
10 stars 8 forks source link

Possible Bug in ".starsind" #25

Closed gnopuz83 closed 1 year ago

gnopuz83 commented 1 year ago

Hi Zachary, I am Daniele, a phd student with Christian. I am working with pulsar and I think that there may be a bug in the function ".starsind" in "mcPulsarSelect.R". This bug occurs because ".starsind" does not take into account the case where all the variability values are lower than the variability threshold. Instead of selecting the highest possible value in Bounded Stars, it selects the lowest. Thank you very much for your help!!

Daniele

zdk123 commented 1 year ago

Thanks for the report. Do you have a MWE? I'm not quite sure what the right way to handle this - i.e. selecting the highest possible value would result in 'unbounded' StARS so it may be better to throw an error and let the user restart, perhaps with a different lambda path. Thoughts @muellsen?

gnopuz83 commented 1 year ago

Hi, I don't think changing the lambda path completely solves the problem. I would set an if statement in the ".starsind" function.

Dataset and Code

Test_dataset.csv Pulsar_possible_bug_code_R.zip

muellsen commented 1 year ago

We went through the code last week, and as Daniele mentioned, for some settings with n>>p the lower bound is loose (too high) so all variabilities are below the threshold. In the B-Stars setting, it is thus better to use the left-most lambda value (at lower bound) rather than right most value (the latter of which is reasonable for variabilities being higher than the threshold throughout the lb ub interval).

muellsen commented 1 year ago

So, the simple if statement should do its job I think.

zdk123 commented 1 year ago

I'll happily take a pull request 😊

On Mon, Feb 6, 2023, 1:31 PM Christian L. Müller @.***> wrote:

So, the simple if statement should do its job I think.

— Reply to this email directly, view it on GitHub https://github.com/zdk123/pulsar/issues/25#issuecomment-1419560394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUD2RFGXNF3O6MOSGMF5VTWWE7PDANCNFSM6AAAAAAUSUT6SY . You are receiving this because you commented.Message ID: @.***>