8000 Feature: Adds MCP penalty as option for regularization of GEE model. by josrpowe208 · Pull Request #9445 · statsmodels/statsmodels · GitHub
[go: up one dir, main page]

Skip to content

Feature: Adds MCP penalty as option for regularization of GEE model. #9445

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

josrpowe208
Copy link
  • closes #xxxx
  • tests added / passed.
  • code/documentation is well formatted.
  • properly formatted commit message. See
    NumPy's guide.

Notes:
Added the option for selecting the Minimax Concave Penalty (MCP), Zhang 2010a; DOI: 10.1214/09-AOS729, for fitting a regularized version of the GEE model.

@pep8speaks
Copy link

Hello @josrpowe208! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1399:58: W291 trailing whitespace
Line 1401:50: W291 trailing whitespace
Line 1402:39: W291 trailing whitespace
Line 1405:35: W291 trailing whitespace
Line 1409:1: W293 blank line contains whitespace

Line 1828:1: W293 blank line contains whitespace

@@ -1432,7 +1441,7 @@ def _regularized_covmat(self, mean_params):

return ma

def fit_regularized(self, pen_wt, scad_param=3.7, maxiter=100,
def fit_regularized(self, pen_wt, gamma=3.7, method='scad', maxiter=100,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks backwards compatibility

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can revert gamma to scad_param for the purpose of backward compatibility. However, both SCAD and MCP use gamma as the parameter in the function, so this should likely be changed in future releases to avoid confusion if both penalty methods are made available in the same fit call.

@josef-pkt
Copy link
Member

PR looks fine, but I'm not familiar with the details here and need to read up to review this.

I worked a lot with SCAD in statsmodels, but never looked closely at MCP.
New issue #9604 to look at MCP and include it for generic penalization.

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

Successfully merging this pull request may close these issues.

3 participants
0