项目作者: tsuboshun

项目描述 :
KdTree for calculating Shannon entropy
高级语言: C++
项目地址: git://github.com/tsuboshun/KdTree.git
创建时间: 2018-08-13T05:31:54Z
项目社区:https://github.com/tsuboshun/KdTree

开源协议:

下载


KdTree for calculating Shannon entropy

1. About

This is a simple code for the calculation of Shannon entropy or mutual information, written in C++.
You can implement KL method for the calculation of Shannon entropy and KSG method for that of mutual information.
Please refer to test.cpp for the usage.
I note that there is already a famous library called JIDT for these methods, which is written in Java.
I wrote this code referring to the code of JIDT, and checked the consistency of the calculation results.
This code can compute Shannon entropy faster than JIDT, but it is around six times slower than JIDT for the calculation of mutual information.

2. How to run

You need to install the Boost C++ library beforehand. If you are in the directory of KdTree.cpp, you can compile test.cpp as follows.
g++ test.cpp KdTree.cpp -I/path_to_boost_library -std=c++11