@overfullrule=0pt
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
0.0.1 nk_fb_gen_c.gen_c |
nk_fb_gen_c.gen_c
: N 次元 Fisher-Bingham 分布についての最尤推定を HGD 法(holonomic gradient descent) でやるための C のプログラムを生成する.
Description:
この関数により, testN.c, testN.h なる二つの C のプログラムが生成される. testN.c にデータ, 最尤推定探索用のパラメータ初期値を設定する. コマンド
gcc testN.c $OpenXM_HOME/lib/libko_fb.a -lgsl -lblas
で実行可能形式のファイルを作成する.
なお, libko_fb.a は ‘OpenXM/src/hgm/fisher-bingham/src/’ でmake install
することにより生成される. またシステムには gsl がインストールされていないといけない. ‘OpenXM/src/hgm/fisher-bingham/src/Testdata’ にサンプルの データ, 最尤推定探索用のパラメータ初期値がある.
testN.h の#define MULTIMIN_FDFMINIMIZER_TYPE
で gsl のどの最適化関数を呼び出すか変更できる. testN.h の#define ODEIV_STEP_TYPE
で gsl のどの常微分方程式数値解析関数を呼び出すか変更できる.
アルゴリズムの詳細は, T. Koyama, H. Nakayama, K. Nishiyama, N. Takayama, Holonomic Gradient Descent for the Fisher-Bingham Distribution on the d-dimensional Sphere, Computational Statistics (2013), http://dx.doi.org/10.1007/s00180-013-0456-z を参照.
Authors; T.Koyama, H.Nakayama, K.Nishiyama, N.Takayama.
Example:
[1854] load("nk_fb_gen_c.rr"); [2186] nk_fb_gen_c.gen_c(1); S^1 の問題を解く program を生成. generate test1.h generate test1.c 1 [2187] quit; $ emacs test1.c & Write data here. とコメントに書かれているところの後 に $(OpenXM_HOME)/src/hgm/fisher-bingham/Testdata/s1_wind_data.h を挿入. 保存終了. $ gcc test1.c $OpenXM_HOME/lib/libko_fb.a -lgsl -lblas $ ./a.out --- snip points = [1.11945, 3.33044, -0.469454, 0.904504, -0.770373] values = [3.4421, 1.13891, -0.0217944, 2.28474] grad ; 0.005644 -0.033429 -0.005644 0.045820 0.047695 norm(grad) ; 0.074535 --- snip ここで, points が parameter x11,x12,x22,y1,y2 の推定値. Value 3.4421 が 尤度値の逆数で, これが最小化されている.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Jump to: | N |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
N | |||
nk_fb_gen_c.gen_c | 0.0.1 nk_fb_gen_c.gen_c | ||
|
Jump to: | N |
---|
[Top] | [Contents] | [Index] | [ ? ] |
[Top] | [Contents] | [Index] | [ ? ] |
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on May 1, 2025 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on May 1, 2025 using texi2html 5.0.