Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG/REF: discrete fit_regularized uses print instead of warning #3794

Closed
josef-pkt opened this issue Jun 27, 2017 · 1 comment · Fixed by #5848
Closed

BUG/REF: discrete fit_regularized uses print instead of warning #3794

josef-pkt opened this issue Jun 27, 2017 · 1 comment · Fixed by #5848

Comments

@josef-pkt
Copy link
Member

print(message) in base.l1solvers_common

in writing a unit test for GeneralizedPoisson fit_regularized #3789, I get the warning "print" if penalization alpha is small. Given that it is a print I don't see a way to catch it in unit test noise.
I'm testing that low penalization has results close to unpenalized fit

>>> tt.res1.model.fit_regularized(alpha=alpha*0.1)
QC check did not pass for 5 out of 10 parameters
Try increasing solver accuracy or number of iterations, decreasing alpha, or switch solvers
Could not trim params automatically due to failed QC check.  Trimming using trim_mode == 'size' will still work.
...
@josef-pkt
Copy link
Member Author

Do we need a special warning or do we use ConvergenceWarning?

postponing to 0.10,
AFAIR, qc check needs review and documentation, e.g. #2239

@josef-pkt josef-pkt modified the milestones: 0.9, 0.10 Oct 9, 2017
@josef-pkt josef-pkt removed this from bugs in 0.9 Oct 9, 2017
bashtage added a commit to bashtage/statsmodels that referenced this issue Jun 8, 2019
Warn users abotu convergence rather than priting a message

closes statsmodels#3794
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant