Download latest version from http://sourceforge.net/projects/minepy/files/.
No installation is required. See C API and C++ API on how to include the library in your C/C++ sofware and how to compile.
On GNU/Linux, OSX and FreeBSD you need the following requirements:
- GCC
- Python >= 2.6 or 3.X
- NumPy >= 1.3.0 (with header files)
Untar minepy-X.Y.Z.tar.gz, creating minepy-X.Y.Z folder (where X.Y.Z is the current version of minepy)
Go into minepy-X.Y.Z folder and from a terminal run:
$ sudo python setup.py install
If you have installation problems on MAC OS X try:
$ sudo ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install
If you don’t have root access, installing minepy in a directory by specifying the --prefix argument. Then you need to set PYTHONPATH:
$ python setup.py install --prefix=/path/to/modules
$ export PYTHONPATH=$PYTHONPATH:/path/to/modules/lib/python{version}/site-packages
On MS Windows (Xp, Vista and 7) you need the following requirements:
- Python 2.7 32 bit
- NumPy >= 1.6 for Python 2.7
The library works with MATLAB >= 7.3 (R2006b) since it supports 64-Bit indexing. See http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
Untar minepy-X.Y.Z.tar.gz, creating minepy-X.Y.Z folder (where X.Y.Z is the current version of minepy)
Open MATLAB
In the MATLAB “command window” go into the minepy-X.Y.Z folder by typing:
>> cd path_to_minepy-X.Y.Z/matlab/
Build the binary MEX file by typing:
>> mex mine_mex.c ../minepy/libmine/mine.c ../minepy/libmine/core.c
Now, you have the binary MEX-file in path_to_minepy-X.Y.Z/matlab/ (mine_mex.mex*, where * can be a64, maci64, w32 or w64)
Put your MEX-file (mine_mex.mex*) and mine.m in a folder on the MATLAB path. Alternatively, you can add path_to_minepy-X.Y.Z/matlab/ selecting File > SetPath.
Test the MEX-file by typing:
>> minestats = mine([1,2,3,4,5,6], [1,2,3,4,5,6])
minestats =
mic: 1
mas: 0
mev: 1
mcn: 2
Untar minepy-X.Y.Z.tar.gz, creating minepy-X.Y.Z folder (where X.Y.Z is the current version of minepy)
Run OCTAVE
Go into the minepy-X.Y.Z folder by typing:
octave:1> cd path_to_minepy-X.Y.Z/matlab/
Build the binary MEX-file by typing:
octave:2> mex mine_mex.c ../minepy/libmine/mine.c ../minepy/libmine/core.c
Now, you have the binary MEX-file in path_to_minepy-X.Y.Z/matlab/ (mine_mex.mex)
Put your MEX-file (mine_mex.mex) and mine.m in a folder on the OCTAVE path. Alternatively, you can add path_to_minepy-X.Y.Z/matlab/ in the OCTAVE startup file (http://www.gnu.org/software/octave/doc/interpreter/Startup-Files.html)
Test the MEX-file by typing:
octave:3> minestats = mine([1,2,3,4,5,6], [1,2,3,4,5,6])
minestats =
{
mic = 1
mas = 0
mev = 1
mcn = 2
}