NegativeBinomial missing fit_regularized method #1454

Closed
josef-pkt opened this Issue Mar 9, 2014 · 0 comments

Projects

None yet

1 participant

@josef-pkt
Member

see #1453 for an error this causes

the main problem is that the inherited start_params doesn't take the extra negbin parameters into account.

aside: finding the range of alpha to use for regularization is not obvious. needs to be relatively large in the larger (nobs=20,000) dataset alpha=10

I think by default we should not penalize the negbin parameter, e.g.
if alpha >0 and isscalar(alpha) then

amask = np.ones(len(res.params))
amask[-1] = 0
alpha = alpha * amask

also: there are no documentation examples for fit_regularized

@josef-pkt josef-pkt added a commit to josef-pkt/statsmodels that referenced this issue Apr 22, 2014
@josef-pkt josef-pkt BUG NegativeBinomial add fit_regularized closes #1453 closes #1454
    adjust test to handle extra parameter
16dfb7d
@josef-pkt josef-pkt added a commit that closed this issue Jul 22, 2014
@josef-pkt josef-pkt BUG NegativeBinomial add fit_regularized closes #1453 closes #1454
    adjust test to handle extra parameter
544400d
@josef-pkt josef-pkt closed this in 544400d Jul 22, 2014
@PierreBdR PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014
@josef-pkt josef-pkt BUG NegativeBinomial add fit_regularized closes #1453 closes #1454
    adjust test to handle extra parameter
5be6a86
@yarikoptic yarikoptic added a commit to yarikoptic/statsmodels that referenced this issue Oct 23, 2014
@yarikoptic yarikoptic Merge commit 'v0.5.0-1189-g48f7a21' into releases
* commit 'v0.5.0-1189-g48f7a21': (970 commits)
  REF _fit_newton use np.asarray(hess)
  REF: _fit_newton, add ridge_factor option, default 1e-10
  REF: _fit_newton add Ridge correction to Hessian, see also #953
  Bug comment: commented out code, weigths don't sum to 1 see #1845
  CLN: TST cleanup comment, unused code.
  REF: "is" None (not ==)
  BUG: fix if alpha is scalar, TST: try standardized
  REF: NegativeBinomial fit_regularized, try regularized Poisson for start_params
  DOC: add comment in notes about not penalizing NegBin shape parameter [skip ci]
  TST: TestNegativeBinomialL1Compatability use desired as start_params
  TST: adjust test, precision and start_params (failure on TravisCI)
  BUG: NegativeBinomial fix aic, bic for 'geometric', adjust tests
  REF add k_extra to NegativeBinomial, don't count it in df_model, df_resid
  TST explicitely define k_extra in test class
  CLN: a few cosmetic changes
  TST fix negbin geometric test for fit_regularized
  CLN L1NegativeBinomialResults rename closes #1615,     remove redundant `__init__`
  BUG NegativeBinomial add fit_regularized closes #1453 closes  #1454     adjust test to handle extra parameter
  REF: has_constant remove special code in linear_model, is moved to data
  Fix const_idx with multiple const, more tests
  ...
18a1faa
@yarikoptic yarikoptic added a commit to yarikoptic/statsmodels that referenced this issue Oct 23, 2014
@yarikoptic yarikoptic Merge branch 'releases' into debian-experimental
* releases: (970 commits)
  REF _fit_newton use np.asarray(hess)
  REF: _fit_newton, add ridge_factor option, default 1e-10
  REF: _fit_newton add Ridge correction to Hessian, see also #953
  Bug comment: commented out code, weigths don't sum to 1 see #1845
  CLN: TST cleanup comment, unused code.
  REF: "is" None (not ==)
  BUG: fix if alpha is scalar, TST: try standardized
  REF: NegativeBinomial fit_regularized, try regularized Poisson for start_params
  DOC: add comment in notes about not penalizing NegBin shape parameter [skip ci]
  TST: TestNegativeBinomialL1Compatability use desired as start_params
  TST: adjust test, precision and start_params (failure on TravisCI)
  BUG: NegativeBinomial fix aic, bic for 'geometric', adjust tests
  REF add k_extra to NegativeBinomial, don't count it in df_model, df_resid
  TST explicitely define k_extra in test class
  CLN: a few cosmetic changes
  TST fix negbin geometric test for fit_regularized
  CLN L1NegativeBinomialResults rename closes #1615,     remove redundant `__init__`
  BUG NegativeBinomial add fit_regularized closes #1453 closes  #1454     adjust test to handle extra parameter
  REF: has_constant remove special code in linear_model, is moved to data
  Fix const_idx with multiple const, more tests
  ...
8f2ab7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment