Repository navigation
BUG Negbin fit regularized - #1623
Conversation
There was a problem hiding this comment.
Can use use self.res_reg.model.k_exog here to make sure it's being used systematically?
There was a problem hiding this comment.
m is a setting for the test, it is here the number unpenalized beta params,
m=k_exog in the reduced version but m < k_exog in the regularized version.
in my interpreter session I don't have a model.k_exog. where is k_exog set?
There was a problem hiding this comment.
Right. From the description I thought that the tests were testing the unregularized vs. regularized without any actual regularization.
It looks like k_exog is only systematically set in ARIMA so far. Should be moved up to base. Still TODO in #487.
|
I'm giving up on #1624 for this PR temporary solution: |
|
TravisCI fails in all versions two possible problems in this PR for optimization:
|
|
still red no idea about optimization problem, which param is nan ? |
|
all green when I'm cheating with the start_params |
|
ready to merge, I leave the start_params to another PR. according to the network graph, this didn't branch off from master, might need rebase before merging |
|
That's better, after standardizing exog (mean=0, std=1) TravisCI manages to estimate correctly. No more exceptions. #1649 example with convergence or optimization failure another review of this PR and it is ready to merge |
There was a problem hiding this comment.
input/argument checking should be at the beginning before we calculate anything.
statsmodels#1454 adjust test to handle extra parameter
remove redundant `__init__`
TST: try standardized
BUG Negbin fit regularized missing
…ized BUG Negbin fit regularized missing
adds fit_regularized method to NegativeBinomial
fixes #1453 and #1454
note:
code is mostly copy paste see #1615
took me a while to figure out copy/paste/adjust errors for example #1617
one issue not clear:
NegativeBinomial transforms parameters in some cases, I chose not to:
self._transparams = FalseTODO: how can I adjust the docstring?
by default if alpha is scalar, then the penalization is not applied to the extra, shape parameter alpha of nb1 and nb2
unittests follow the same pattern as the other L1 test, compare reduced unregularized estimation with regularized estimation that doesn't penalize the original parameters