Open jaydu1 opened 7 months ago
Thanks, confirmed, (it's not notebook specific) There is a hardcoded
with warnings.catch_warnings():
warnings.simplefilter("always")
but strange part is that it is when computing start_params, not in the main fit. When I provide start_params in the example, then the warning does not show up.
my guess is that this was supposed to set "ignore" instead of "always" to suppress problems in start_params computation.
The same pattern shows up in many/all fit_regualrized in discrete_models
GenericZeroInflated fit_regularized does not do anything with warnings.
_get_start_params
for regular fit in ZI subclasses uses "ignore": warnings.simplefilter("ignore", category=ConvergenceWarning)
When running
statsmodels.discrete.discrete_model.NegativeBinomial(...).fit_regularized(...)
, I encountered a warning fromhttps://github.com/statsmodels/statsmodels/blob/192670b31c9069b247b0901d66013853e2ca47b7/statsmodels/base/l1_solvers_common.py#L70-L71
Even though the results from
model.summary
look ok, the warning cannot be turned off and ignored withwarnings.filterwarnings('ignore')
. Below is the code that reproduces the problem:Thanks