Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add support for Jacobian adjustment

オープン
#265 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
r
領域
data

調査の方向性

まず loo() の出力構造、特に $pointwise スロットと $estimates スロットを読み、参照されている table_of_estimates() ヘルパーを確認してください。Jacobian 調整をどのように渡すべきかを定義し、2 つを超えるモデルを比較する場合のモデルの順序も含め、影響を受けるすべての要約の一貫性を確保してください。

索引モデルが issue の本文から書いたものです。

説明

Related to discussion in a Stan discourse post

ROS book and some Stan discourse answers show how to make Jacobian adjustment for elpd_loo values if different models use different transformations of the continuous target. I had tested that a simple approach of adjusting the pointwise values as

loo_2_with_jacobian <- loo_2
loo_2_with_jacobian$pointwise[,1] <- loo_2_with_jacobian$pointwise[,1] - log(2*sqrt(data$y))

works when comparing two models. In case of more than two models, the summary values in $estimates slot are used to sort the models, which causes problems if the order is different after Jacobian adjustment. A quick fix is to update the summary, too

loo_2_with_jacobian$estimates["elpd_loo",] <- loo:::table_of_estimates(loo_2_with_jacobian$pointwise[,"elpd_loo", drop=FALSE])

It would be better to make a function that would properly update all the slots, or probably even better to add jacobian argument to loo() function.

This update would not be big, doesn't cause backward compatibility issues, and would make the life of users easier

主要言語
R
スター
157
フォーク
38
平均マージ
4日 16時間
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stan-dev/loo のほかの issue

stan-dev/loo の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。