Implement the generalized normal distribution
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
首先檢視現有的 normal 和 double_exponential 入口點,以及連結的 Wikipedia 定義。確立新分佈所需的參數化方式、支援的輸入、導數、邊界情況和測試涵蓋率。完成的標準是:廣義分佈已與函式庫一致地實作,且其行為已在相關情況下獲得驗證。
由索引模型根據 Issue 內容生成。
描述
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:
y ~ normal(X*beta, sigma);
produces the criterion minimize $L_2$ norm of (X*beta-y) (a.k.a. least squares). But then
y ~ double_exponential(X*beta, sigma);
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,
beta ~ normal(0, lambda);
y ~ normal(X*beta, sigma);
produces the $L_2$ regularized ridge and
beta ~ double_exponential(0, lambda);
y ~ normal(X*beta, sigma);
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.
- 主要語言
- C++
- 星號
- 845
- 分支
- 225
- 平均合併
- 4 天 21 小時
- 30 天內合併 PR
- 13
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
stan-dev/math 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 54/100
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 54/100
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
維護者通常 1 天內回覆
-
numerics performance
難度 5/5 一週以上 新手友好度 35/100
stan-dev/math#3481 · 1 個 reaction ·
維護者通常 1 天內回覆
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`可能重新可做 關聯的 PR 已關閉且未合併。 未關閉bug
難度 3/5 1-2 天 新手友好度 55/100
維護者通常 1 天內回覆
相似的 Issue
-
mlir
難度 2/5 1-3 小時 新手友好度 72/100
llvm/llvm-project#241070 · 1 則留言 ·
維護者通常 1 天內回覆
-
backlog documentation
難度 1/5 1 小時以內 新手友好度 96/100
EchoTools/nevr-runtime#2354 ·
維護者通常 1 天內回覆
-
help wanted new command
難度 2/5 1-3 小時 新手友好度 76/100
tldr-pages/tldr#25111 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 77/100
NVIDIA/cuda-quantum#5886 ·
維護者通常 1 天內回覆