Skip to content

tsuboshun/KdTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

KdTree for calculating Shannon entropy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published