Nested sampling algorithm

出典: フリー百科事典『ウィキペディア(Wikipedia)』

Nested sampling algorithmとは、ベイズ統計におけるモデル比較、及び事後分布からのサンプル生成のための計算手法である。 2004年に物理学者のジョン・スキリング(John Skilling)によって開発された。 [1]

背景[編集]

ベイズの定理によれば、同時に真となることはない二つのモデルの組 に対し、データ を観測した時のモデル の事後確率は次のように計算できる:

ここで に対する事前確率は既知であるとする。事後確率を求めるには残りのベイズ因子 を求める必要があるが、一般にNuisance paramterを周辺化(積分)する必要があるため、評価はそれほど簡単ではない。一般にモデル がパラメータ (多次元であってもよく、モデルにより異なっても良い)を持つとき、 の周辺化は次のようになる:

この積分はしばしば解析的に扱いにくいものであり、数値アルゴリズムを用い近似値を求める必要があります。Nested sampling algorithmは、特にこういった周縁化積分の近似計算のためにJohn Skillingによって開発され、積分計算と同時に事後分布 からのサンプルが生成できるという追加の利点がある [2]。これはベイズ推定の観点からはブリッジサンプリングや防御的重要度サンプリングなどの[3]方法に代わるものである。

Nested sampling algorithmの単純なバージョンは次のようになる。周辺確率密度 は以下のように計算される:

Start with  points  sampled from prior. 
for  to  do   % The number of iterations j is chosen by guesswork.
    current likelihood values of the points 
    
     
    Save the point with least likelihood as a sample point with weight .
    Update the point with least likelihood with some Markov chain Monte Carlo steps according to the prior, accepting only steps that 
    keep the likelihood above end 
return ;

各繰り返しステップにおいては、 における値より大きい尤度をもつようなパラメータ空間の体積の推定値である。重み は2つの超曲面 及び の間の体積の推定値である。更新手順により、による合計を計算することで、以下の積分を数値的に近似する:

の極限でこの推定量にはの正のバイアスがあるが [4]の代わりにを上記のアルゴリズムで用いることでこの誤差を取り除くことができる。

この計算手法の発想は、 の範囲を細分化し、各間隔 ごとに、ランダムに選択された点 がこの区間内に存在する確率を推定する、ということである。これはルベーグ積分を数値的に実装するベイズ流の方法と考えることができる。 [5]

実装[編集]

Nested sampling algorhithmの各プログラミング言語ごとの公開済み実装例は以下の通り。

  • CR 、またはPythonの簡単な例は、JohnSkillingのWebサイトにある。 [6]
  • 上記の単純なコードのHaskell実装例はHackageにある。 [7]
  • スペクトルフィッティングするために設計されたRの例は出典[8]で説明されており、GitHub上にも存在する。 [9]
  • DiamondsというC ++の例は、GitHubにある。
  • 統計物理学と物性物理学で使用する高度にモジュール化されたPythonの例は、GitHubにあります。
  • pymatnestは、さまざまな材料のエネルギー地形を探索し、任意の温度での熱力学的変数を計算し、相転移を特定するために設計されたPythonパッケージである。
  • MultiNestは、多峰性事後分布のNested sampling algorithmによるサンプリングを実行できる。 [10] C ++、Fortran、Python入力用のインターフェースがあり、GitHubで入手できる。
  • PolyChordは、GitHubで利用できるもう1つのNested sampling algorithmソフトウェアパッケージである。 PolyChordの計算効率は、パラメーターの数が増えるとMultiNestより適切にスケーリングされる。つまり、PolyChordは、高次元の問題に対してより効率的になる場合がある。 [11]
  • NestedSamplers.jl:単一および複数の楕円体のネストされたサンプリングアルゴリズムを実装するためのJulia パッケージがGitHub上にある。

応用[編集]

Nested sampling algorithm は2004年に提案されて以来、天文学の分野の多くの側面で使用されており、宇宙論的モデルの選択と物体検出にも使用された。これは、「精度、一般的な適用性、および計算の実現可能性を併せ持っている」ためである。 [12]多峰性事後確率を処理するためのアルゴリズムの改良が、現存するデータセット内の天体を検出する手段として提案されている。 [10]Nested sampling algorithmの他の応用は、アルゴリズムを使用して最適な有限要素モデルを選択する有限要素更新の分野にあり、これは構造ダイナミクスに適用された。 [13]このサンプリング方法は、材料モデリングの分野でも使用されている。統計力学から分配関数を学習し、熱力学的特性を導き出すためにも使用できる。 [14]

動的 Nested sampling[編集]

動的 Nested samplingは、Nested sampling algorithmの一般化であり、計算の精度が最大になるようにパラメータ空間のさまざまな領域で取得されるサンプルの数が動的に調整される。 [15]これにより、サンプルの割り当てを変更できず、計算精度にほとんど影響を与えない領域で多くのサンプルが取得される、元のNested sampling algorithm と比較して、精度と計算効率が大幅に向上する場合がある。

公開されている動的Nested samplingのソフトウェアパッケージには、次のものがある。

  • dynesty -GitHubからダウンロードできる動的なネストされたサンプリングのPython実装。 [16] [17]
  • dyPolyChord:Python、C ++、Fortranの尤度および事前分布で使用できるソフトウェアパッケージ。 [18] dyPolyChordはGitHubで入手できる。 [19]

動的Nested samplingは色々な科学分野で使用され、重力波検出[20]、空間内の距離のマッピング[21] 、太陽系外惑星の検出など、さまざまな科学的問題に適用されてきた。 [22]

関連項目[編集]

参考文献[編集]

  1. ^ Skilling, John (2004). “Nested Sampling”. AIP Conference Proceedings 735: 395–405. Bibcode2004AIPC..735..395S. doi:10.1063/1.1835238. 
  2. ^ Skilling, John (2006). “Nested Sampling for General Bayesian Computation”. Bayesian Analysis 1 (4): 833–860. doi:10.1214/06-BA127. 
  3. ^ Chen, Ming-Hui, Shao, Qi-Man, and Ibrahim, Joseph George (2000). Monte Carlo methods in Bayesian computation. Springer. ISBN 978-0-387-98935-8. https://books.google.com/books?id=R3GeFfshc7wC 
  4. ^ Walter, Clement (2017). “Point-process based Monte Carlo estimation”. Statistics and Computing 27: 219–236. arXiv:1412.6368. doi:10.1007/s11222-015-9617-y. 
  5. ^ Jasa, Tomislav; Xiang, Ning (2012). “Nested sampling applied in Bayesian room-acoustics decay analysis”. Journal of the Acoustical Society of America 132 (5): 3251–3262. Bibcode2012ASAJ..132.3251J. doi:10.1121/1.4754550. PMID 23145609. https://semanticscholar.org/paper/8225853110831e251aff26fc9b6431d0f2cc6e6c. 
  6. ^ John Skilling website
  7. ^ Nested sampling algorithm in Haskell at Hackage
  8. ^ Nested sampling algorithm in R on Bojan Nikolic website
  9. ^ Nested sampling algorithm in R on GitHub
  10. ^ a b Feroz, F.; Hobson, M.P. (2008). “Multimodal nested sampling: an efficient and robust alternative to Markov Chain Monte Carlo methods for astronomical data analyses”. MNRAS 384 (2): 449–463. arXiv:0704.3704. Bibcode2008MNRAS.384..449F. doi:10.1111/j.1365-2966.2007.12353.x. http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:0704.3704. 
  11. ^ Handley, Will; Mike, Hobson; Anthony, Lasenby (2015). “polychord: next-generation nested sampling”. Monthly Notices of the Royal Astronomical Society 453 (4): 4384–4398. arXiv:1506.00171. Bibcode2015MNRAS.453.4384H. doi:10.1093/mnras/stv1911. 
  12. ^ Mukherjee, P.; Parkinson, D.; Liddle, A.R. (2006). “A Nested Sampling Algorithm for Cosmological Model Selection”. Astrophysical Journal 638 (2): 51–54. arXiv:astro-ph/0508461. Bibcode2006ApJ...638L..51M. doi:10.1086/501068. 
  13. ^ Mthembu, L.; Marwala, T.; Friswell, M.I.; Adhikari, S. (2011). “Model selection in finite element model updating using the Bayesian evidence statistic”. Mechanical Systems and Signal Processing 25 (7): 2399–2412. Bibcode2011MSSP...25.2399M. doi:10.1016/j.ymssp.2011.04.001. 
  14. ^ Partay, Livia B. (2010). “Efficient Sampling of Atomic Configurational Spaces”. The Journal of Physical Chemistry B 114 (32): 10502–10512. arXiv:0906.3544. doi:10.1021/jp1012973. PMID 20701382. 
  15. ^ Higson, Edward; Handley, Will; Hobson, Michael; Lasenby, Anthony (2019). “Dynamic nested sampling: an improved algorithm for parameter estimation and evidence calculation”. Statistics and Computing 29 (5): 891–913. arXiv:1704.03459. Bibcode2019S&C....29..891H. doi:10.1007/s11222-018-9844-0. 
  16. ^ The dynesty nested sampling software package on GitHub
  17. ^ Speagle, Joshua (2020). “dynesty: A Dynamic Nested Sampling Package for Estimating Bayesian Posteriors and Evidences”. Monthly Notices of the Royal Astronomical Society 493 (3): 3132–3158. arXiv:1904.02180. doi:10.1093/mnras/staa278. 
  18. ^ Higson, Edward (2018). “dyPolyChord: dynamic nested sampling with PolyChord”. Journal of Open Source Software 3 (29): 965. doi:10.21105/joss.00965. 
  19. ^ The dyPolyChord dynamic nested sampling software package on GitHub
  20. ^ Ashton, Gregory (2019). “Bilby: A User-friendly Bayesian Inference Library for Gravitational-wave Astronomy”. The Astrophysical Journal Supplement Series 241 (2): 13. arXiv:1811.02042. Bibcode2019ApJS..241...27A. doi:10.3847/1538-4365/ab06fcetal 
  21. ^ Zucker, Catherine (2018). “Mapping Distances across the Perseus Molecular Cloud Using {CO} Observations, Stellar Photometry, and Gaia {DR}2 Parallax Measurements”. The Astrophysical Journal 869 (1): 83. arXiv:1803.08931. doi:10.3847/1538-4357/aae97cetal 
  22. ^ Günther, Maximilian (2019). “A super-Earth and two sub-Neptunes transiting the nearby and quiet M dwarf TOI-270”. Nature Astronomy 3 (12): 1099–1108. arXiv:1903.06107. Bibcode2019NatAs...3.1099G. doi:10.1038/s41550-019-0845-5etal