Skip to content
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

Docs for P1 are a bit unclear #594

Closed
david-cortes opened this issue Dec 27, 2022 · 2 comments
Closed

Docs for P1 are a bit unclear #594

david-cortes opened this issue Dec 27, 2022 · 2 comments

Comments

@david-cortes
Copy link

In the API reference for glum.GeneralizedLinearRegressor:
https://glum.readthedocs.io/en/latest/glm.html#glum.GeneralizedLinearRegressor

It says about P2:

With this option, you can set the P2 matrix in the L2 penalty w * P2 * w. This gives a fine control over this penalty (Tikhonov regularization). A 2d array is directly used as the square matrix P2.

But for P1:

With this array, you can exclude coefficients from the L1 penalty. Set the corresponding value to 1 (include) or 0 (exclude).

The latter one gives the impression that P1 is only for inclusion/exclusion instead of also being usable as a per-feature multiplier.

@MarcAntoineSchmidtQC
Copy link
Member

Thanks for pointing this out. You are 100% correct. See the corresponding PR for a rephrased docstring: #595.

@jtilly
Copy link
Member

jtilly commented Jan 5, 2023

Closed by #595

@jtilly jtilly closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants