Project details for MIToolbox

Logo MIToolbox 3.0.0

by apocock - January 8, 2017, 00:43:22 CET [ Project Homepage BibTeX BibTeX for corresponding Paper Download ]

view ( today), download ( today ), 14 comments, 0 subscriptions

Description:

A mutual information library for C/C++ and Mex bindings for MATLAB.

This toolbox is aimed at people who wish to use mutual information for feature selection, and provides a range of information theoretic functions. All functions estimate the probabilities from the supplied data vectors. Some example implementations of common mutual information based feature selection algorithms are provided in both C and MATLAB, CMIM - (Fleuret 2004), mRMR - (Peng et al 2005), DISR - (Bontempi & Meyer 2006). The implementations contained in here are early versions of those in the FEAST library, and the implementations in FEAST should be used in preference to the ones in MIToolbox.

All functions discretise the inputs by rounding down to the nearest integer.

This toolbox was developed to support our work in feature selection, which resulted in the paper "Conditional Likelihood Maximisation: A Unifying Framework for Information Theoretic Feature Selection", G Brown, A Pocock, M-J Zhao, M Lujan. JMLR 2012 (link). Please cite this paper if you use our toolbox.

The feature selection algorithms developed for that paper form the FEAST toolbox, published at mloss here.

List of functions: Entropy, Conditional Entropy, Joint Entropy, Mutual Information, Conditional Mutual Information, Renyi's Entropy, Renyi's Mutual Information, Weighted Entropy, Weighted Conditional Entropy Creating a joint random variable

A Java implementation of the Shannon entropy functions is available from my GitHub page here.

Changes to previous version:

Major refactor of code and reorganised the repository so it's a little more sensible.

  • Refactored all C functions to expose a version which takes unsigned integer inputs.
  • Rearranged the repository to separate out headers from source, and MATLAB code from C library code.

Minor changes:

  • General code cleanup to reduce duplicated code.
  • Adding an COMPILE_R flag to go with the COMPILE_C flag, to make it easier to produce an R wrapper.
  • All code now compiles cleanly with "-std=c89 -Wall -Werror".
BibTeX Entry: Download
Corresponding Paper BibTeX Entry: Download
Supported Operating Systems: Linux, Macosx, Windows
Data Formats: Matlab
Tags: Conditional Entropy, Conditional Mutual Information, Entropy, Mutual Information, Renyi Entropy
Archive: download here

Comments

Aida Brank (on September 22, 2016, 20:11:50)
Hello, I have following error: Undefined function or variable 'FSToolboxMex'. Error in feast (line 70) selectedFeatures = FSToolboxMex(4,numToSelect,data,labels); though I did as I run ComlileMIToolbox.m in MIToolbox directory. Thanks!!! Regards
Adam Pocock (on September 22, 2016, 22:09:08)
Hi Aida, That error means you haven't compiled FEAST correctly. You need to compile both FEAST and MIToolbox separately. Thanks, Adam
Fazeelat Mazhar (on February 7, 2017, 08:54:10)
Hi Adam, I am facing error in running CompileMIToolbox.m file on MATLAB. Error is: Error using mex CalculateProbability.c C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(271) : error C2275: 'ProbabilityState' : illegal use of this type as an expression ../include\MIToolbox/CalculateProbability.h(40) : see declaration of 'ProbabilityState' C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(271) : error C2146: syntax error : missing ';' before identifier 'state' C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(271) : error C2065: 'state' : undeclared identifier C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(271) : error C2440: '=' : cannot convert from 'ProbabilityState' to 'int' C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(276) : error C2065: 'state' : undeclared identifier C:\Users\Fazeelat\Downloads\MIToolbox-3.0.0\MIToolbox-3.0.0\src\CalculateProbability.c(276) : error C2440: 'return' : cannot convert from 'int' to 'ProbabilityState'
Adam Pocock (on February 7, 2017, 14:58:04)
Hi Fazeelat, What C compiler, Matlab version and Windows version are you using? Thanks, Adam
Fazeelat Mazhar (on February 8, 2017, 05:02:06)
C compiler, Microsoft Visual studio 2010 Matlab version 8.4 Windows 8.1
Adam Pocock (on February 9, 2017, 02:41:55)
Hi Fazeelat, Turns out there was one place where I didn't strictly follow ANSI C. GCC wasn't throwing an error, but apparently Visual Studio does. I've fixed it now, can you try version 3.0.1 from [my GitHub page](https://github.com/Craigacp/MIToolbox/releases/tag/v3.0.1). Thanks, Adam
Fazeelat Mazhar (on February 9, 2017, 06:20:30)
Thanks Adam, that error has been fixed. Another error of out of memory appeared while finding MI of two matrices. My dataset is a bit large dimension i.e.,146X16. Can you help?
Adam Pocock (on February 9, 2017, 16:08:59)
Hi Fazeelat, MIToolbox isn't really suitable for that kind of mutual information estimation. You need many more samples to do discrete entropy estimation in a 16 dimensional space, and the mutual information will work in a 32 dimensional space (assuming both your matrices are the same size). If you have a continuous space you might have more luck with a continuous MI estimator using a k-nn or minimum spanning tree approximation, but MIToolbox doesn't implement either of those. I think Zoltan Szabo's [ITE toolkit](https://bitbucket.org/szzoli/ite/) might be more appropriate. Thanks, Adam
Fazeelat Mazhar (on February 10, 2017, 07:05:12)
Thanks Adam.
Janek Janek (on February 20, 2017, 18:56:54)
Adam. Please Help me. This problem http://s1.fotowrzut.pl/YLV6QVY97K/1.jpg Matlab R2016a Windows7 I try wersion 3.0.1 Help
Adam Pocock (on February 20, 2017, 19:14:21)
Hi Janek, Please check that CompileFEAST is pointing at v3.0.1 of MIToolbox. The version that is packaged in the MLOSS download is v3.0.0 which has that bug. You'll need to download MIToolbox v3.0.1 from Github and unpack it in the directory next to FEAST. Thanks, Adam
Janek Janek (on February 20, 2017, 19:51:15)
Adam, Help Gee I do not understand You can check it's toolbox I use this http://s1.fotowrzut.pl/O2V2AUIRNB/1.jpg http://s1.fotowrzut.pl/61GMCSFD4I/1.jpg http://www82.zippyshare.com/v/BSJx3Xlk/file.html Please check whether it is good in the toolbox Thanks, Janek
Adam Pocock (on February 20, 2017, 20:04:32)
Hi Janek, You haven't unpacked the updated version of MIToolbox in the right directory. The error message from MATLAB shows it's looking in the directory above FEAST, not inside the FEAST directory. The zip you sent compiles fine on my Linux box from within the FEAST/matlab directory. I don't have access to a copy of Matlab on Windows with Visual Studio to test it out further. Thanks, Adam
Janek Janek (on February 20, 2017, 20:36:48)
Hi Adam, I fixed thanks for your help. http://s1.fotowrzut.pl/LKXJ3BQIDV/1.jpg Thanks, Janek

Leave a comment

You must be logged in to post comments.