-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Implement the generalized normal distribution #3133
Comments
Just some notes on the corresponding formulas: We have the density: The log-density: And the parital derivatives: We may factor the following subexpressions to simplify computations:
We can then express the partials as: |
I'm putting this into wolfram alpha and getting different gradient results. Can you double check these results? |
I posted the corrected formulas in the #3157 PR commentary |
Description
Implement Generalized normal distribution https://en.wikipedia.org/wiki/Generalized_normal_distribution
Why this is useful?
It generalizes the normal (for p=2) and double exponential (Laplace) distribution (for p=1) and in the limit case also the uniform (p → ∞) for the shape parameter p.
These correspond to the$L_p$ norms when used for regularization and in other cases.
For examples:
produces the criterion minimize$L_2$ norm of (X*beta-y) (a.k.a. least squares). But then
produces the criterion minimize$L_1$ norm of (X*beta-y). (a.k.a. least absolute deviations)
Similarly, in the Bayesian interpretation of ridge and LASSO,
produces the$L_2$ regularized ridge and
produces the$L_1$ regularized LASSO.
Using the Generalized normal distribution would allow to conveniently use an arbitrary$L_p$ norm for the optimization criterion, or to even find the suitable value of p when used as a parameter.
The text was updated successfully, but these errors were encountered: