Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 29 forks source link

L1 penalization when all parameters are cell-specific #92

Closed ryvinec closed 7 years ago

ryvinec commented 7 years ago

Hi, I encounter a bug in line 30-31 of l1Selectopt.m: "tmp = find(signifmat(1,:) < 0); final_ind = tmp(end);"

When the optimization cannot find parameters to fix to 0 (the full model is already the most parsimoneous one), the variable "tmp" above is empty and line 31 causes an error.

May be one can add an if statement, and select the full model if tmp is empty (a warning concerning the threshold for parameters to be taken at 0 could be helpful too)

Thanks in advance, Romain

bernhardsteiert commented 7 years ago

Thanks Romain for pointing this out!

Cheers, Bernhard