Fisher-Bingham MLE Manual

Edition : auto generated by oxgentexi on March 28, 2024

OpenXM.org

@overfullrule=0pt

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

0.0.1 nk_fb_gen_c.gen_c

nk_fb_gen_c.gen_c(N)

: It generates a C program to make a MLE (maximal likelihood estimate) by the HGD (holonomic gradient descent) for N dimensional Fisher-Bingham distribution.

Description:

This function generates two C programs testN.c and testN.h. After setting data and an initial point to make MLE in testN.c, build an executable file by the command

gcc testN.c $OpenXM_HOME/lib/libko_fb.a -lgsl -lblas

The libray file libko_fb.a is generated by make install in the folder ‘OpenXM/src/hgm/fisher-bingham/src/’ The GSL (Gnu Scientific Library) should also be installed in the system. Sample data and initial points are in ‘OpenXM/src/hgm/fisher-bingham/src/Testdata’.
The definition #define MULTIMIN_FDFMINIMIZER_TYPE in testN.h specifies an optimization problem solver of gsl. The definition #define ODEIV_STEP_TYPE in testN.h specifies a solver of the ordinary differential equation of gsl.
As to the algorithm, refer to 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);     Generate a program to solve MLE on S^1
generate test1.h
generate test1.c
1
[2187] quit;
$ emacs test1.c &

Find a line which contains
     Write data here
and insert $(OpenXM_HOME)/src/hgm/fisher-bingham/Testdata/s1_wind_data.h.
after this line.
Save and quit emacs.

$ 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

where ``points'' is the estimated value of the parameter x11,x12,x22,y1,y2.
Value 3.4421 is the inverse of the likelihood which is minimized.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents


[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated on March 28, 2024 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 March 28, 2024 using texi2html 5.0.