Fisher-Bingham MLE Manual

Edition : auto generated by oxgentexi on 13 May 2014

OpenXM.org


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.

Index

Jump to: n

n

  • nk_fb_gen_c.gen_c
  • Jump to:

    @vfill @eject


    This document was generated on 13 May 2014 using texi2html 1.56k.