You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: add penalized classes, cases for penalized mixin #7128
I think our PenalizedMixin is underused and not very convenient.
We need specific classes to make it more usable, and so we can start to collect more post-estimation results.
e.g. adding penalization specific information criteria #5404
We might also want to add some with a specific penalty function, e.g. GLMSCAD or similar, e.g. for use with sure independence screening SIS.
extension
Two part models like zero-inflated, or later models that have mean and variance functions are not yet (fully) supported for variable selection, e.g. SIS, variable addition score_test. Although, PenalizedMixin should be generic enough for those.
they use a one-step quadratic approximation to penalized loglike
penalization parameter selected by modified BIC (no formula for it but reference, mayby TIC-version on selected model)
They use penalization weights proportional to full MLE bse to reduce to one tuning parameter
They report binary fit measures, specificity, sensitivity, ... for variable selection in simulations.
aside: references include score tests for zero-inflation
29. van den Broek J. A score test for zero inflation in a Poisson distribution. Biometrics 1995; 51:738--743.
31. Deng D, Paul SR. Score tests for zero-inflation and over-dispersion in generalized linear models. Statistica Sinica
2005; 15:257--276.
I used the first for diagnostics_count, but don't seem to have downloaded the second article
bump.
I would like to try this with BetaModel. see reference above for SCAD penalization
I guess nothing in the PenalizedMixin assumes that we only have one exog, so penalized BetaModel should work generically.
semi-random thought looking at the OrderedPenalized results
scaling of exog and params in penalties, e.g. exog are not zscored
penalities like SCAD are not scale independent, AFAIR
not sure if I seen this already or added comments somewhere
quick try using weights,
thresholds/constants are not penalized.
coefficients for exog are penalized proportional to their exog.std
I never thought about penalized ordinal regression and have not read any references about it.
However, the Mixin class applies to all maximum likelihood models that use generic (scipy) optimizers in fit.
AFAIR, parameters, like the threshold parameters, can be exempt from penalization using the weights keyword in the Mixin or by specifying an appropriate penalty function (e.g. stochastic constraint matrix in L2 penalization).
Activity
josef-pkt commentedon Oct 30, 2020
example beta regression with two exog
Zhao, Weihua, Riquan Zhang, Yazhao Lv, and Jicai Liu. 2014. “Variable Selection for Varying Dispersion Beta Regression Model.” Journal of Applied Statistics 41 (1): 95–108. https://doi.org/10.1080/02664763.2013.830284.
josef-pkt commentedon Oct 31, 2020
ZIP-SCAD
Buu, Anne, Norman J. Johnson, Runze Li, and Xianming Tan. 2011. “New Variable Selection Methods for Zero-Inflated Count Data with Applications to the Substance Abuse Field.” Statistics in Medicine 30 (18): 2326–40. https://doi.org/10.1002/sim.4268.
they use a one-step quadratic approximation to penalized loglike
penalization parameter selected by modified BIC (no formula for it but reference, mayby TIC-version on selected model)
They use penalization weights proportional to full MLE
bseto reduce to one tuning parameterThey report binary fit measures, specificity, sensitivity, ... for variable selection in simulations.
aside: references include score tests for zero-inflation
29. van den Broek J. A score test for zero inflation in a Poisson distribution. Biometrics 1995; 51:738--743.
31. Deng D, Paul SR. Score tests for zero-inflation and over-dispersion in generalized linear models. Statistica Sinica
2005; 15:257--276.
I used the first for diagnostics_count, but don't seem to have downloaded the second article
josef-pkt commentedon Nov 28, 2021
bump.
I would like to try this with BetaModel. see reference above for SCAD penalization
I guess nothing in the PenalizedMixin assumes that we only have one exog, so penalized BetaModel should work generically.
josef-pkt commentedon Nov 28, 2021
oops, last two comment should be in a PR, will copy there and delete here
josef-pkt commentedon Mar 3, 2023
Current unit tests (in base/tests) use only one-parameter models. GLM, Poisson, Logit, Probit, Gaussian
There could still be problems with multi-parameter models, e.g. how null model is defined.
example would be OrderedModel, besides, multi-parameter count models like NBP, GPP
https://stackoverflow.com/questions/75624091/ordinal-logistic-regression-with-regularization
update
quick try. It works, but bfgs has convergence problems (precision loss) for some pen_weights
example from
https://stackoverflow.com/questions/75559325/llr-pvalue-extract-from-orderedresults-statsmodels
aside: ordered model summary does not show llnull, llr_pvalue and prsquared. Those are available as results attributes
josef-pkt commentedon Mar 4, 2023
semi-random thought looking at the OrderedPenalized results
scaling of exog and params in penalties, e.g. exog are not zscored
penalities like SCAD are not scale independent, AFAIR
not sure if I seen this already or added comments somewhere
quick try using
weights,thresholds/constants are not penalized.
coefficients for exog are penalized proportional to their exog.std
josef-pkt commentedon Mar 4, 2023
penalized mixin model results has standard aic, bic
in gam results class
__init__we haveand info criteria are defined in GLMResults using df_model
also: Bug compared to docstring
PenalizedMixin.fit uses hardcoded trim threshold, instead of keyword value if provided
YogiOnBioinformatics commentedon Oct 8, 2024
@josef-pkt are there any plans to create the regularized Ordinal Regression?
josef-pkt commentedon Oct 9, 2024
I never thought about penalized ordinal regression and have not read any references about it.
However, the Mixin class applies to all maximum likelihood models that use generic (scipy) optimizers in fit.
AFAIR, parameters, like the threshold parameters, can be exempt from penalization using the weights keyword in the Mixin or by specifying an appropriate penalty function (e.g. stochastic constraint matrix in L2 penalization).
YogiOnBioinformatics commentedon Oct 16, 2024
@josef-pkt
This is an example of penalized Ordinal Regression that's the most famous.
https://cloud.r-project.org/web/packages/ordinalNet/ordinalNet.pdf
I guess I'm just looking to see if this type of functionality can also be applied here.
I'm not too sure what you mean by the last sentence (sorry for that).
Do you mind rephrasing or providing an example?