Repository navigation
ENH: penalized MLE - #2374
ENH: penalized MLE#2374josef-pkt wants to merge 23 commits into
Conversation
|
@kshedden I added the first draft of the The unit tests compare PoissonPenalized with unpenalized and oracle estimators. I haven't looked at the same in R yet. There are several open issues on the design, and we still need a reusable way to get a trimmed/reduced final results instance. I will add some notes to the description. |
|
as expected. problems with python 2 (on TravisCI) getting to a good python 2 compatible signature is still unclear |
|
The last commit see #2393 about problems in "retrofitting" an existing results instance. |
|
a computational comment to previous commit |
there are at least two test failures because of differnt optim options
|
The previous commit with |
|
The linalg error is still there, |
31fd893 to
c3791cb
Compare
6e411ed to
3fff63f
Compare
|
cov_type HC0 tests for next todo: unit tests for penalized with cov_type It's working (but the special casing is not really pretty) |
|
still incorrect with PenalizedMixin: auxiliary regression doesn't use the correct penalization ( I don't know if there is already a way to do it in |
|
should we allow a set_attributes method on the model like scikit-learn? Still todo: modified results instance does not have correct cov_type info yet, if cov_type is not |
|
I'm working now with knot selection by SCAD penalization for regression splines. I just found a paper that seems to be close to what I'm doing (for Poisson example) (not read yet) There are several other articles with LASS0 and Bridge with pre-selected knot or discontinuity points. @DonBeo This might be an interesting background reading (skipping technical details) for what we might do after GAM with L2 penalized splines. |
|
merged in #4576 |
first commit is adding
base._penalties.SCADhessian/deriv2 not tested yet
now also with
PenalizedMixinand_fit_zerosopen questions:
skip_hessianif we don't use it, or only use it to get an array to overwriteRuntime Warning "inverting hessian failed" in singular exog case, but we work around
review penalties
func, so it can be used in vectorized formgradinstead of deriv or score or whateveralso
weightsshould be spelled outfuncsurprised me initially, but I guess it makes sense.PenalizedMixin
My initial notebook is here to try out different things http://nbviewer.ipython.org/gist/josef-pkt/1847e9af6092da12b192
I only used Poisson to check the more complete class
open issues
fit_constrainedfor Poisson which is not available for many other models and is computationally inefficient because it doesn't special case dropping variables.cov_type='HC0'in some examples in notebook but it's not yet implemented and default in the Mixin_fit_zeros and recreating results instances
Since we need it in several places this includes now also a new method to fit zero restrictions (dropping variables) which can be reused by other
fit_xxxmethods. The main purpose was to get a trial version for creating a results instance for the full model from a reduced or reparameterized auxiliary model.As application of
_fit_zerosit also contains a new _fit_collinearReferences
So far all my scad code is based on several article by Fan Li 2001, additional articles of either with co-authors.
They mention some R packages, and I just saw http://cran.r-project.org/web/packages/mpath/index.html
which should be useful for unit tests and comparison. includes count models and sandwiches.