The Bingham statistics library contains implementations of the Bingham distribution for directional (axial) statistics on the unit spheres S1, S2, and S3. In addition, finite element approximations are available via tessellations of S2 and S3.
This repository was exported from the original and now to be abandoned SVN repository on google code with consent of the original author Jared Glover.
- See the Tutorials section below for Matlab and C tutorials.
- Added matlab functions bingham_fit() and bingham_fit_scatter().
- Added several utility functions.
- Fixed a bug in bingham_mult() caused by eigen_symm() returning eigenvalues in the wrong order (compared to the GSL version).
- Also added more matlab functions.
- Enlarged Bingham lookup tables to handle concentration params up to -900.
- More MATLAB support.
- Removed dependency on GSL.
- Switched from GPL to BSD license.
See the wiki for more information.
The preferred method for download is checking out the latest code in this repository.
The library contains both C and Matlab code, but only the C code is currently supported. (The Matlab functions are mostly used for plotting figures, and do not contain a complete implementation of the Bingham distribution. Use with caution!)
In the folder bingham/c, run:
make
make install
This will install the C library, libbingham.a, on your machine. To use the library in your own project, simply add "-lbingham" to your linker flags and include the appropriate headers as you would with any other C library.
Documentation is still sparse, but there are many examples in the bingham/c directory in test_bingham.c, test_util.c, fit_bingham.c, bingham_lookup.c, bingham_sample.c, and cluster_bingham.c.