FEASThttp://mloss.orgUpdates and additions to FEASTenWed, 06 Sep 2017 21:17:02 -0000FEAST 2.0.0<html><p>A FEAture Selection Toolbox for C/C++, MATLAB/OCTAVE and Java, v2.0.0. </p> <p>FEAST provides implementations of common mutual information based filter feature selection algorithms, and an implementation of RELIEF. All functions expect discrete inputs (except RELIEF, which does not depend on the MIToolbox), and they return the selected feature indices. These implementations were developed to help our research into the similarities between these algorithms, and our results are presented in the following paper: </p> <p> Conditional Likelihood Maximisation: A Unifying Framework for Information Theoretic Feature Selection G. Brown, A. Pocock, M.-J. Zhao, M. Lujan Journal of Machine Learning Research, 13:27-66 (2012) </p> <p>The weighted feature selection algorithms are described in: </p> <p> Information Theoretic Feature Selection for Cost-Sensitive Problems A. Pocock, N. Edakunni, M.-J. Zhao, M. Lujan, G. Brown. ArXiv </p> <p>If you use these implementations for academic research please cite the relevant paper above. All FEAST code is licensed under the BSD 3-Clause License. </p> <p>Contains implementations of: mim, mrmr, mifs, cmim, jmi, disr, cife, icap, condred, cmi, relief, fcbf, betagamma </p> <p>And weighted implementations of: mim, cmim, jmi, disr, cmi </p> <p>References for these algorithms are provided in the accompanying feast.bib file (in BibTeX format). </p> <p>FEAST works on discrete inputs, and all continuous values <strong>must</strong> be discretised before use with FEAST. In our experiments we've found that using 10 equal width bins is suitable for many problems, though this is data set size dependent. FEAST produces unreliable results when used with continuous inputs, runs slowly and uses much more memory than usual. The discrete inputs should have small cardinality, FEAST will treat values {1,10,100} the same way it treats {1,2,3} and the latter will be both faster and use less memory. </p> <p>MATLAB Example (using "data" as our feature matrix, and "labels" as the class label vector): </p> <blockquote><blockquote><p>size(data) ans = (569,30) %% denoting 569 examples, and 30 features </p> <p>selectedIndices = feast('jmi',5,data,labels) %% selecting the top 5 features using the jmi algorithm selectedIndices = </p> </blockquote></blockquote><pre><code>28 21 8 27 23 </code></pre><blockquote><blockquote><p>selectedIndices = feast('mrmr',10,data,labels) %% selecting the top 10 features using the mrmr algorithm selectedIndices = </p> </blockquote></blockquote><pre><code>28 24 22 8 27 21 29 4 7 25 </code></pre><blockquote><blockquote><p>selectedIndices = feast('mifs',5,data,labels,0.7) %% selecting the top 5 features using the mifs algorithm with beta = 0.7 selectedIndices = </p> </blockquote></blockquote><pre><code>28 24 22 20 29 </code></pre><p>The library is written in ANSI C for compatibility with the MATLAB mex compiler, except for MIM, FCBF and RELIEF, which are written in MATLAB/OCTAVE script. There is a different implementation of MIM available for use in the C library. </p> <p>MIToolbox v3.0.1 is required to compile these algorithms, and these implementations supercede the example implementations given in that package (they have more robust behaviour when used with unexpected inputs). </p> <p>MIToolbox can be found at: </p> <p>The C library expects all matrices in column-major format (i.e. Fortran style). This is for two reasons, a) MATLAB generates Fortran-style arrays, and b) feature selection iterates over columns rather than rows, unlike most other ML processes. </p> <p>Compilation instructions: * MATLAB/OCTAVE - run CompileFEAST.m <em> Linux C shared library - use the included makefile </em> Java - see java/ </p></html>adam pocock, gavin brownSun, 08 Jan 2017 00:49:19 -0000 selectionfeature rankingmutual informationjmlr<b>Comment by Ryan Brauchler on 2014-02-05 22:57</b><p>First off, I'm a huge fan of this toolbox, and generally, it works great. </p> <p>I am implementing it to select features from an extremely high dimensional data set (~ 1,000 x 500,000). To do so, I placed this function into a loop where I break the initial matrix (which is held in a memmapfile to save memory) into N smaller bits and then feed that into FEAST and return the columns of the chosen features. The output of this loop is simply a 1xN cell array where each cell in the array is a list of the columns chosen by the algorithm. I am just using the mrmr algorithm in the toolbox. </p> <p>After a few iterations of this loop, however, I always get an out of memory error from Matlab. The toolbox works great in isolation, but when you start using it multiple times in a loop, it seems there is a memory leak in the MEX file for mrmr, and I would imagine its also in the others. Just wanted to bring the issue to your attention. I am going to focus on fixing it myself, but figured it might be faster to put it in the hands of the experts who wrote it. </p> <p>Thanks!</p> Ryan BrauchlerWed, 05 Feb 2014 22:57:35 -0000<b>Comment by Adam Pocock on 2014-02-06 02:40</b><p>Hi Ryan,</p> <p>Do you know if the error occurs when using FEAST from C/C++? I've had issues with Matlab before where it doesn't properly free memory allocated in MEX files (even though mxFree was called) which eventually leads to memory fragmentation and then subsequent MEX calls fail. </p> <p>What version of Matlab are you using, and how much RAM is there in the machine?</p> <p>Adam</p> Adam PocockThu, 06 Feb 2014 02:40:32 -0000<b>Comment by Ryan Brauchler on 2014-02-06 04:16</b><p>Hi Adam.</p> <p>Thank you so much for the prompt response. </p> <p>I have yet to try running the code outside Matlab, though I could attempt to do so tomorrow. It very well could be the case that it's a Matlab fragmentation error. If that's in fact the case is there a workaround that overcomes this issue? </p> <p>I'm using Matlab R2013a with 32GB of RAM in the machine. When the array is broken up into smaller pieces, each piece is less than 3MB in size, so that shouldn't end up being an issue of physical memory limitations. </p> <p>Thanks,</p> <p>Ryan</p> Ryan BrauchlerThu, 06 Feb 2014 04:16:54 -0000<b>Comment by Adam Pocock on 2014-02-06 05:22</b><p>Hi Ryan,</p> <p>One test you could do is see if Feast has the same issue (in Matlab) if you just rerun it multiple times on the same partition of the dataset. That way Matlab shouldn't do any more allocation beyond what is necessary to store the features (though it will still fragment the RAM a bit). We tested it fairly heavily by running it repeatedly across multiple datasets in the same Matlab instance, but we didn't have anything quite as large as the one you are using.</p> <p>Drop me an email at apocock at and we can look at this in a little more detail.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockThu, 06 Feb 2014 05:22:11 -0000<b>Comment by YS L on 2014-07-11 03:27</b><p>Hi Admin,</p> <p>I just find this toolbox and am going to use it for my project. However, I still met the problem of memory. I use the functions like :"[selectedFeatures] = feast('mrmr',200,X,Y) ", where X is a (# sample) × (# feature) matrix and Y is a (# sample) × 1 binary vector (-1,1). When I call the feast function, MATLAB report error "Out of memory". </p> <p>I downloaded the newest version of the toolbox. My matlab version is R2012a and memory size is 32 Gb. The data is quite small around 200 × 300. Is there any suggestion to fix the problem?</p> <p>Thanks a lot !</p> YS LFri, 11 Jul 2014 03:27:02 -0000<b>Comment by Adam Pocock on 2014-07-11 04:46</b><p>Hi,</p> <p>There are two preprocessing steps you should do before using the toolbox.</p> <ul> <li>Ensure the data has been discretised into bins.</li> <li>Transform the data by relabelling it (if a feature has value {1,100,1000} convert it to {1,2,3}).</li> </ul> <p>This should fix any out of memory errors for small datasets.</p> <p>Adam</p> Adam PocockFri, 11 Jul 2014 04:46:35 -0000<b>Comment by YS L on 2014-07-11 05:17</b><p>Hi Adam,</p> <p>That works! Thanks a lot</p> YS LFri, 11 Jul 2014 05:17:59 -0000<b>Comment by A Smith on 2014-08-05 03:08</b><p>Adam,</p> <p>I'm having some trouble using FCBF. Inside the "SU" subfunction, there seems to be two functions h() and mi() that are undefined. Did I not install the Toolbox correctly? </p> A SmithTue, 05 Aug 2014 03:08:58 -0000<b>Comment by Adam Pocock on 2014-08-05 04:03</b><p>Looks like I forgot to add a bit to my setup instructions. FCBF uses the Matlab interface to MIToolbox (unlike the rest of FEAST which compiles in the C code), so you need to add the MIToolbox folder to your Matlab path. MIToolbox contains the h.m and mi.m files which FCBF uses.</p> <p>Adam</p> Adam PocockTue, 05 Aug 2014 04:03:14 -0000<b>Comment by ahmed hamdy on 2014-09-22 16:05</b><p>First of all, let me thank you for your perfect work. I'm intending to use your toolbox (FEAST) I'm using matlab 12 and i added the feast and the MIToolbox to the matlab path. then i tried index = feast('jmi',10,horse,Diagnosis) where horse is the feature matrix(299x26) and Diagnosis is the target concept (299x1)</p> <h1>but i got the following error</h1> <p>undefined function 'MIToolbxMex' for input argument of type 'double' Error in feast(line 70)</p> <h1>selectedFeatures = FSToolboxMex(4, numToSelect, data, labels);</h1> <p>please help me Ahmed Hamdy.</p> ahmed hamdyMon, 22 Sep 2014 16:05:11 -0000<b>Comment by Adam Pocock on 2014-09-22 16:19</b><p>Hi Ahmed,</p> <p>You need to compile MIToolbox as well as FEAST. Run CompileMIToolbox.m in the MIToolbox directory.</p> <p>Adam</p> Adam PocockMon, 22 Sep 2014 16:19:20 -0000<b>Comment by ahmed hamdy on 2014-09-22 16:35</b><p>Thanks a lot sir Adam. when running compileMIToolbox.m</p> <h1>i got the following error</h1> <p>Error using mex (line 206) Unable to complete successfully.</p> <p>Error in CompileMIToolbox (line 3) mex MIToolboxMex.c MutualInformation.c Entropy.c CalculateProbability.c ArrayOperations.c</p> ahmed hamdyMon, 22 Sep 2014 16:35:50 -0000<b>Comment by Adam Pocock on 2014-09-22 16:42</b><p>Hi Ahmed,</p> <p>Drop me an email (apocock at cs dot man dot ac dot uk). It looks like mex isn't setup correctly, so could you send me your OS (plus if its 32 or 64 bit), matlab version, and C compiler version?</p> <p>Adam</p> Adam PocockMon, 22 Sep 2014 16:42:30 -0000<b>Comment by Anupam D on 2014-10-07 22:55</b><p>Hi Adam, I'm trying to use FEAST toolbox for feature selection. I have a relatively small data set right now, but I'm getting the following error in Matlab "Out of Memory". I tried using both Matlab R014a and R2013.</p> <p>My data size is 130x50 (samples x features). The feature values are different floating point numbers ranging from [1000000 to -1]</p> <p>Is there any restrictions on the range of values that can be used to represent a feature?</p> Anupam DTue, 07 Oct 2014 22:55:39 -0000<b>Comment by Adam Pocock on 2014-10-08 00:20</b><p>Hi Anupam,</p> <p>The short answer is yes, you should use a small range of values. </p> <p>FEAST uses the discrete mutual information and will round your floating point values to the lowest integer. It's better to do this yourself before using the tool as then you get more control over it. After you've done the discretisation you should map the discrete values into a smaller range (e.g. if a feature has value {1,100,1000} convert it to {1,2,3}). FEAST uses a relatively naive mapping function as it is written for maximum compatibility, so smaller values allocate less memory. The discrete mutual information doesn't take into account the value of a variable so this transformation doesn't change the result.</p> <p>You should discretise it into a small number of bins given you only have 130 samples, the mutual information behaves poorly when the number of states/bins is approximately the same as the number of samples.</p> <p>Adam</p> Adam PocockWed, 08 Oct 2014 00:20:20 -0000<b>Comment by Anupam D on 2014-10-08 00:49</b><p>Thanks Adam, for the explanation. Two more questions for u :)</p> <ol> <li><p>Could you clarify what you are referring by discretization? The 130 samples are from 13 classes.</p></li> <li><p>So would normalizing the features values to [0,1] work? I see it works (doesn't give the 'Out of memory error') but what kind of impact does that have on the selection algorithm?</p></li> </ol> <p>-Anupam</p> Anupam DWed, 08 Oct 2014 00:49:41 -0000<b>Comment by Adam Pocock on 2014-10-08 01:00</b><p>Hi Anupam,</p> <p>By discretisation I mean mapping the floating point values onto a small set of integer values. For example if you have a feature in the range [1, 100], then you could map all values in the range [1,10] to 1, [11,20] -> 2 ... [91,100] -> 10. </p> <p>I would not recommend normalizing the features to [0,1] as then there are only two states in the discrete mi calculation (0 and 1) which loses a lot of information. The choice of the number of bins is a trade off between the amount of information available for learning, and the estimation error in the mutual information. Small numbers of states have low amounts of information and low estimation error. Large numbers of states have high information and high estimation error. In my publications we usually used 10 bins, and that seemed to work well across a variety of datasets. If you had many more samples then you could try using more bins, but wtih 130 samples I would recommendn't more than 10. If you want to read about our experimental setup its in the "Conditional Likelihood Maximisation: A Unifying..." paper in the bibtex on this page.</p> <p>Adam</p> Adam PocockWed, 08 Oct 2014 01:00:33 -0000<b>Comment by Anupam D on 2014-10-08 01:06</b><p>Great! Thanks for the quick response.</p> <p>-Anupam</p> Anupam DWed, 08 Oct 2014 01:06:35 -0000<b>Comment by Guofa Li on 2014-10-10 05:23</b><p>I'd like to say that this is a great toolbox! Using the toolbox, I selected the best features to recognize the different categories. Here is a question I want to know. Is there a way to know the correct categorization rate using the selected features?</p> Guofa LiFri, 10 Oct 2014 05:23:47 -0000<b>Comment by Guofa Li on 2014-10-10 05:37</b><p>I read the questions from Anupam and the answers from Adam. Here is another question. If I do not map the values in ranges (e.g.[1,10] to 1, [11,20] -> 2 ... [91,100] -> 10 ), what will happen?</p> <p>I run the feast function and got the selected indices. But the values I used were all double numbers (e.g. 75.7702, 98.4044) and I got the selected indices successfully. Is there anything wrong with the results?</p> Guofa LiFri, 10 Oct 2014 05:37:48 -0000<b>Comment by Adam Pocock on 2014-10-11 00:24</b><p>Hi Guofa,</p> <p>I'm not quite sure what your first question is asking. Do you want to know the classification error rate using the selected features, or some other property? If you want to find the classification error rate then you will need to train a classifier on the training dataset using the selected features. FEAST uses filter algorithms which measure the quality of a feature set in a different way than the classification error.</p> <p>The feast function will run in many cases without discretisation, though the selected features might not have any meaning. There isn't any validation in the code to check to see if the mutual information values used are calculated accurately (and this is a difficult problem to detect in general). If you only have a small number of floating point values, (i.e. many data points all had the value 75.7702) then the result will be sound, however in general it is better to discretise the values. If you don't remap the values into ranges then you are likely to run into the out of memory errors reported in the other comments, though the remapping doesn't affect the quality of the results.</p> <p>Basically, discretise your dataset into a smallish number of bins before running FEAST. Otherwise the answers that are generated are not reliable.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSat, 11 Oct 2014 00:24:00 -0000<b>Comment by Joshua Juen on 2014-10-12 06:33</b><p>Hi,</p> <p>I am having a problem getting the same results with the C (and Python bindings) as I am with the Matlab version of the library. I am using as input the test data set provided by PyFEAST (digit.txt). I ran jmi with the top 15 input vectors through the python test and got:</p> <p>[6.0, 11.0, 14.0, 19.0, 22.0, 27.0, 30.0, 35.0, 38.0, 43.0, 46.0, 51.0, 54.0, 59.0, 62.0]</p> <p>I also ran a test on the same data in the Matlab version running on Windows and got:</p> <p>14, 21, 22, 27, 28, 30, 35, 37, 38, 43, 44, 45, 51, 59, 62</p> <p>I was confused by the difference in output with the same input data, same method so I wrote a program in straight C to use the C library directly (No Python Bindings). When I call the C function jmi with the same input data I get:</p> <p>27,19,35,11,51,59,14,22,38,54,62,46,43,30,6</p> <p>This clearly matches the output from the python binding (when sorted) but not Matlab. To make sure I was not having a problem with Matlab on Windows, I also installed and compiled on Matlab running on Ubuntu. I ran with the same input data again and got:</p> <p>14, 21, 22, 27, 28, 30, 35, 37, 38, 43, 44, 45, 51, 59, 62</p> <p>Am I doing something wrong here? Why is the output different on my Matlab compilations than my C (and PyFeast) implementations?</p> <p>Thanks Josh</p> Joshua JuenSun, 12 Oct 2014 06:33:33 -0000<b>Comment by Joshua Juen on 2014-10-12 16:28</b><p>Upon further investigation, it looks like the Matlab code feeds the data into jmi in column-major order and the C code examples (and python bindings) feed them in using row-major order. That seems to be the difference. </p> <p>Should jmi take the data in row-major or column-major order? </p> <p>Based on the code, it looks like it should be column-major order, but I wanted to confirm before moving ahead. In that case, the sample input files in pyFEAST are incorrect and I will correspond with the author. I will also fix my C implementation as well.</p> <p>Thanks Josh</p> Joshua JuenSun, 12 Oct 2014 16:28:53 -0000<b>Comment by Adam Pocock on 2014-10-12 17:32</b><p>Hi Joshua,</p> <p>FEAST expects things in column major order. I haven't looked too closely at the python bindings, I had assumed they also worked in column major. One thing to be careful of is that the ordering of the feature indices has meaning. You should get exactly the same result in the same order out of FEAST no matter what interface you use.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSun, 12 Oct 2014 17:32:18 -0000<b>Comment by Adam Pocock on 2014-10-12 23:56</b><p>Hi Joshua,</p> <p>I had a look at PyFeast, and it's not the sample data file that is incorrect, it's just missing the order="F" flag when the numpy array is created (line 28). From there you get the same results out of MATLAB and Python (once you've subtracted 1 from the MATLAB results as it indexes from 1). I made an issue on their Github, and updated the documentation for FEAST on my Github to reflect that it requires column-major matrices.</p> <p>I think I must have removed the comments that noted this in an earlier pre-release version.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSun, 12 Oct 2014 23:56:24 -0000<b>Comment by Peter Maier on 2015-07-01 18:44</b><p>Hello everybody,</p> <p>I read all of the entries above and have to ask one simple question about the "out of memory" problem:</p> <p>I have a feature in the range [0,1000] and map it to [1,10] with 10 equally spaced bins. (1. 0-100; 2.101-200 ....)</p> <p>AND I have a feature in the range [-5, 5] -> ?: Do I also map it in the range [1,10] (1. -5 to -4 and so on...) ? </p> <p>Thank you very much! Peter</p> Peter MaierWed, 01 Jul 2015 18:44:55 -0000<b>Comment by Adam Pocock on 2015-07-01 19:07</b><p>Hi Peter,</p> <p>If you have a discrete feature in the range -5,5 then MIToolbox will automatically map it into the range 1,10 as part of the feature selection process (as it doesn't change the output). If it's a continuous feature you might want to discretise it yourself. For discrete mutual informations it's only the number of bins that can change the value, the id given to each bin is irrelevant (i.e. if you have a two valued feature {0,1} it will give an identical entropy &amp; mutual information to the same feature using the values {10,100}).</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 01 Jul 2015 19:07:38 -0000<b>Comment by Peter Maier on 2015-07-01 19:14</b><p>Wow! Thanks for the fast answer. I implemented it already and it gives me a (looks like ;) ) reasonable result!</p> <p>Another question: If I choose for example "selectedIndices = feast('xxx',5,data,labels) %% selecting the top 5 features" -> Is the first feature the most "independent or relevant" or is there any relevance in the output order?</p> <p>Furthermore: If I want to select "the" most relevant features, how can I get information about which algorithm to use? - Is it clever to use just the overlap of all Feature Selection Algorithms? (As we come again to the question of the relevance of the output order) - Is there some recommendation which algorithm works best with classifier X or with noisy data or is it just "try and error" ?</p> <p>Thanks in advance! Peter</p> Peter MaierWed, 01 Jul 2015 19:14:08 -0000<b>Comment by Sarah Smith on 2015-08-24 14:13</b><p>Hi I'm new to feast toolbox and want to use it in my class project. I have a matrix with dimensions 13677*20000. 13677 is the number of data and 20000 is the number of features. when I use feast function in matlab, I get the error 'out of memory'. I do not have any idea how to dicretize it to bins and how to use feast for bins. I really appreciate your help. Thanks so much. Sarah</p> Sarah SmithMon, 24 Aug 2015 14:13:39 -0000<b>Comment by Adam Pocock on 2015-08-24 16:12</b><p>Hi Sarah,</p> <p>There are a couple of things, one that dataset is actually quite large, so don't try to get a full ranking of all the features. Feast uses a cache equal to the number of features times the number of selected features and that will be about 3GB on its own.</p> <p>There are multiple ways you could discretise the data, in our paper we used a very simple procedure which divided each feature into 10 bins of equal width. You can replicate this by finding the range of each feature (i.e. range = max(feature) - min(feature)) and then assigning everything below (min + range/10) to bin 0, everything in the range (min + range/10) to (min + 2*range/10) to bin 1 etc.</p> <p>Thanks,</p> <p>Adam</p> <p>PS @Peter, I missed your last comment, if you are still interested in the relative merits of different feature selection techniques then I recommend you read our paper accompanying feast ( The short version is I'd recommend you use JMI, it has the best empirical performance in our study and has an acceptable set of theoretical tradeoffs.</p> Adam PocockMon, 24 Aug 2015 16:12:53 -0000<b>Comment by Sarah Smith on 2015-08-24 17:19</b><p>Thank you very much Adam by using bins, should I use feast function for each bin separately? <br /> thanks for your help Sarah</p> Sarah SmithMon, 24 Aug 2015 17:19:29 -0000<b>Comment by Adam Pocock on 2015-08-24 17:29</b><p>Hi Sarah,</p> <p>You should create one new data matrix, where each of the features has been replaced with a binned version, and then use that matrix with a single feast call.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockMon, 24 Aug 2015 17:29:59 -0000<b>Comment by Mayank Mahajan on 2015-10-16 06:33</b><p>Hi Adam,</p> <p>I'm trying to use FEAST for a machine learning research project, but I'm getting errors using both MATLAB and PyFeast saying that there is a segmentation fault. Do you know if there's a problem with the input data that is causing this, and what can be done to fix it?</p> <p>Thanks, Mayank</p> Mayank MahajanFri, 16 Oct 2015 06:33:33 -0000<b>Comment by Mayank Mahajan on 2015-10-16 06:35</b><p>Hey Adam,</p> <p>I should add that for PyFeast even the tests are all failing. So it's possible it may not be a data issue.</p> <p>Thanks, Mayank</p> Mayank MahajanFri, 16 Oct 2015 06:35:13 -0000<b>Comment by Adam Pocock on 2015-10-16 06:49</b><p>Hi Mayank,</p> <p>I wouldn't expect Matlab to throw a segmentation fault unless you have particularly strange data. Even then it should give an error message rather than taking down the program. What kind of data are you using? Is it categorical values encoded as integers or something else? Does the crash kill Matlab itself or does it just return with an error?</p> <p>Also, what platform are you running on (i.e. Matlab version, OS, 32 or 64 bit, compiler version).</p> <p>If the pyfeast tests are failing you should post an issue on their GitHub page.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockFri, 16 Oct 2015 06:49:15 -0000<b>Comment by Mayank Mahajan on 2015-10-16 06:55</b><p>I'm using Matlab r2105b on Mac OS X Yosemite 10.10.5 with XCode 6.4, 64 bit. When I run the function, Matlab says it encountered an internal error and says it needs to be closed. It outputs a crash dump file, whose header I've added below:</p> <hr /> <h2> Segmentation violation detected at Thu Oct 15 19:45:52 2015</h2> <p>Configuration: Crash Decoding : Disabled Crash Mode : continue (default) Current Graphics Driver: Unknown hardware Current Visual : Quartz Default Encoding : ISO-8859-1 Host Name : MATLAB Architecture : maci64 MATLAB Root : /Applications/MATLAB<em> MATLAB Version : (R2015b) OpenGL : hardware Operating System : Darwin 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE</em>X86<em>64 x86</em>64 Processor ID : x86 Family 6 Model 69 Stepping 1, GenuineIntel Virtual Machine : Java 1.7.0_75-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode Window System : Quartz</p> <p>Fault Count: 1</p> <p>Abnormal termination: Segmentation violation</p> <hr /> <p>The data I'm using is a bunch of floats, and the labels are 0s and 1s. It's roughly 180000 rows and 175 columns.</p> Mayank MahajanFri, 16 Oct 2015 06:55:19 -0000<b>Comment by Asma Ahmad on 2015-10-21 04:36</b><p>Hi, I am trying to start working on your toolbox. My dataset has 438 rows and 12 columns and I want to select features (may be 6) from the data. But when I try self = feast('condred',6,trainData1,trainLabel1), the result is: self =</p> <pre><code> 5 1 2 3 4 6 </code></pre> <p>And this came up instantly. I tried various combinations but same results. Both MIToolbox and FEAST are under same directory and I did ran "compileFEAST.m" before running example. Is there any thing I am missing? There are no errors, but results seems to be very inaccurate.</p> <p>Please help me on this. Thanks, Asma</p> Asma AhmadWed, 21 Oct 2015 04:36:37 -0000<b>Comment by Adam Pocock on 2015-10-21 23:43</b><p>Hi Mayank,</p> <p>Could you send me an email and we'll fix this offline. My address is further up this thread.</p> <p>Is the label stored as a double or some other Matlab type?</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 21 Oct 2015 23:43:12 -0000<b>Comment by Adam Pocock on 2015-10-21 23:47</b><p>Hi Asma,</p> <p>I wouldn't recommend you use condred, it's a poorly performing measure we implemented to show a theoretical point. You should try jmi or mrmr instead. If these still give similar results then you should check that the features are properly discretised as this behaviour implies all features have the same score, which could occur when each feature has maximum entropy (i.e. each value is unique). In this case FEAST defaults to returning whatever ranking it had, with an ordered list of the remaining features appended to it.</p> <p>I would expect FEAST to return results very quickly for such a small dataset, so the runtime isn't an issue.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 21 Oct 2015 23:47:58 -0000<b>Comment by Rodrigo Ceballos on 2016-03-12 12:34</b><p>Hi Adam and Mayank,</p> <p>I'm having the same segmentation violation that Mayank reported which causes MATLAB to quit. I've tried it on both a Windows 7, 64 bit with 64 bit 2015a MATLAB and a MacOSX 10.11.1 and Matlab 2014b with identical results.</p> <p>Could you mention what the solution was to this issue? I've just installed the toolbox and wanted to test if it runs first. This is my test:</p> <p>%Random 100 trials with 10 features data = rand(100,10)</p> <p>%Random 100 labels labels = round(rand(100,1))</p> <p>%Test MRMR selectedIndices = feast('mrmr',5,data,labels)</p> <p>Maybe this is not a valid test to run? Either way, it shouldn't crash MATLAB the way it currently does.</p> <p>Thanks for any help, Rodrigo</p> Rodrigo CeballosSat, 12 Mar 2016 12:34:43 -0000<b>Comment by Rodrigo Ceballos on 2016-03-12 13:24</b><p>Sorry, the code and comments got messed up above, here it is:</p> <p>features data = rand(100,10);</p> <p>labels = round(rand(100,1));</p> <p>selectedIndices = feast('mrmr',5,data,labels);</p> Rodrigo CeballosSat, 12 Mar 2016 13:24:43 -0000<b>Comment by Adam Pocock on 2016-03-12 17:01</b><p>Hi Rodrigo,</p> <p>I never got a follow up email from Mayank so I couldn't figure out what was causing that segfault. In your case it's because you are feeding feast continuous data when you should be feeding it discretised data. If you use randi instead of rand then it will work.</p> <p>I thought I'd stamped out all the places where this issue makes Matlab segfault, so I'll take a look and fix it. I think the issue in this case is that it's coming back with a zero vector after the rounding, as if you do "data=rand(100,10)*2;" that doesn't crash it. I'll post an update once I've fixed the bug (though it's probably in MIToolbox rather than FEAST itself).</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSat, 12 Mar 2016 17:01:00 -0000<b>Comment by Adam Pocock on 2016-03-12 18:38</b><p>Hi Rodrigo,</p> <p>I've fixed the issue in FEAST v1.1.4. If all the features had zero MI with the target then the code that found the maximum feature would store it's default value of -1 as the first selected feature. So depending on the memory layout it would try and read out of allocated memory, causing the segmentation fault.</p> <p>However in this situation algorithms like mRMR will return the list of feature indices in order, as there is no way to select features, and propagating the error out of Mex is difficult.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSat, 12 Mar 2016 18:38:49 -0000<b>Comment by Rodrigo Ceballos on 2016-03-31 13:59</b><p>Hi Adam,</p> <p>Thank you for clarifying the need to use discrete data and fixing the MI = 0 bug so fast!</p> <p>We have also found another potential bug that you might want to take a look at, or advertise the solution we found. </p> <p>While working with large loops that used the mrmr algorithm repeatedly we found that the memory leak issues only happen when using labels of type logical. For us, merely casting these into doubles fixed the memory leak issues some people above have mentioned. </p> <p>Thanks for all the support and a great library! Rodrigo</p> Rodrigo CeballosThu, 31 Mar 2016 13:59:43 -0000<b>Comment by Adam Pocock on 2016-04-01 01:17</b><p>Hi Rodrigo,</p> <p>You should only use double inputs for FEAST, it's behaviour is undefined if you use any other kind (as the C code underneath expects everything to be doubles). I'm surprised it ran at all when you were using logical labels.</p> <p>I've added a quick check to feast.m on Github which throws an error if you supply it the wrong kind of input (I thought I'd done this a while ago, but it appears not). I don't have time to update the version on MLOSS at the moment, but you should just be able to pull the git version, or copy the 3 lines into your copy of feast.m.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockFri, 01 Apr 2016 01:17:15 -0000<b>Comment by Alejandro Blanco on 2016-04-07 13:52</b><p>Hello Adam,</p> <p>First of all, thanks so much for this fantastic library , some people of my doctoral school asked me if I can mod your code.</p> <p>They wants to modify your code (mainly mim) in order to start with pre-selected set.</p> <p>As I will provide a starting set of variables selected by a exhaustive, close-loop (select->classify->evaluate the results), that I have already implemented.</p> <p>Could you give me some hints about where I have to mod your code in order to supply a preselected set?</p> <p>I'm a senior programmer in many languages. So you can reply if you want as technical as possible.</p> <p>I will be so grateful.</p> <p>Greetings, Alex.</p> Alejandro BlancoThu, 07 Apr 2016 13:52:15 -0000<b>Comment by Alejandro Blanco on 2016-04-07 13:57</b><p>Hello Again,</p> <p>The algorithm actually is CMI not MIM, sorry for my mistake.</p> <p>Greetings,</p> <p>Alex.</p> Alejandro BlancoThu, 07 Apr 2016 13:57:49 -0000<b>Comment by Adam Pocock on 2016-04-07 15:33</b><p>Hi Alejandro,</p> <p>I wouldn't recommend using CMI (implemented in the CondMI.c file) with a large number of selected features as it has estimation issues after a certain point (unless you have exponential amounts of data).</p> <p>There are two ways of modifying the code to supply a preselected feature set, one easy to implement but slow, and one harder to implement but faster.</p> <p>The first option is to start from the example Matlab code in MIToolbox and use that as a basis for modification. Looking at the CMIM.m or IAMB.m (the first stage of IAMB is equivalent to CMI) files, they call the C mutual information functions from Matlab and require about 3 lines of modification to add this functionality. Basically preloading things into answerFeatures for CMIM or cmb for IAMB will have the right effect (CMIM also requires correct calculation of the partialScores vector).</p> <p>The second option requires modifying the feast.m file that does arguments processing and passes things through to FSToolboxMex.c. FSToolboxMex.c needs modification to pass through the extra argument to whichever feature selection technique you choose to modify. Then the FS method itself needs modification to add an extra argument to the function. This needs to be reflected in the FSAlgorithms.h header file, and preferably you should add a method with the original signature that calls the updated method with an empty selected features list. Finally you'll need to actually add the code that incorporates the pre selected features into the method.</p> <p>We should move this discussion to the <a href="">FEAST Github page</a> so we can reference lines of code properly.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockThu, 07 Apr 2016 15:33:26 -0000<b>Comment by Alejandro Blanco on 2016-04-07 16:14</b><p>Hello Adam,</p> <p>Thanks for your prompt reply,</p> <p>I was looking carefully your code and I think that I have a first approach.</p> <p>Ok, I will continue in git.</p> <p>Thank you!</p> Alejandro BlancoThu, 07 Apr 2016 16:14:58 -0000<b>Comment by Ziba Gandomkar on 2016-04-08 09:03</b><p>Hi Adam,</p> <p>First of all, many thanks for this great library. It helped me a lot!</p> <p>I'm facing a problem similar to one asked by Ryan Brauchler (his first comment was posted on February 5, 2014, 22:57:35). I have a high dimensional feature vector( 500 samples *100,000 features) . So I placed the feat function inside a loop and each time a subset of features were fed into the function, but the Matlab crashes after a few iteration. I'll appreciate a lot if you could kindly please whether there is a way to deal with this problem or not. </p> <p>Best regards, Ziba</p> Ziba GandomkarFri, 08 Apr 2016 09:03:42 -0000<b>Comment by Adam Pocock on 2016-04-09 21:30</b><p>Hi Ziba,</p> <p>First thing to check is that you are using the latest version of FEAST from GitHub.</p> <p>Second, does it crash if you just feed in that subset of features outside of a loop? FEAST is sensitive to the values of the inputs, and only works on categorical (integer) values which should be supplied as a double matrix. The main thing to try is to map each feature to a small number of contiguous integers starting from 0. If one subset of features has a large range of values (i.e. {1,100000}, instead of {1,2}) then it will allocate a lot of memory which can cause issues.</p> <p>Third, FEAST caches the mutual information values, so it's memory usage is a linear function of the number of features you want to select and the number of features in the dataset (within a single call to FEAST). It frees all the memory after the call returns so running it in a loop shouldn't cause any trouble.</p> <p>Thanks,</p> <p>Adam </p> Adam PocockSat, 09 Apr 2016 21:30:47 -0000<b>Comment by Ziba Gandomkar on 2016-04-12 02:22</b><p>Dear Adam,</p> <p>Thank yo very much for your response. The second point you've mentioned helped me to solve the problem. </p> <p>Thanks a lot again, Ziba</p> Ziba GandomkarTue, 12 Apr 2016 02:22:43 -0000<b>Comment by Ganesh Singadkar on 2016-05-22 07:15</b><p>Hi, I am using Matlab 2014a, On windos 2007 64 bit. My feature vector is of size (1484x13) of type double and label of size (1484x1) of type double. But when I am trying to use the feature selection algorithm selectedIndices = feast('jmi',5,data,labels) I am getting the error </p> <p>Undefined function 'FSToolboxMex' for input arguments of type 'double'.</p> <p>Error in feast (line 64) selectedFeatures = FSToolboxMex(1,numToSelect,data,labels,beta); I have followed the correct procedure. Initially I have run the CompileMITToolbox.m Please help me to solve this problem. </p> Ganesh SingadkarSun, 22 May 2016 07:15:55 -0000<b>Comment by Ganesh Singadkar on 2016-05-22 07:51</b><p>Hi Adam,</p> <p>First of all, thank you so much for this toolbox. I have fixed the issue which I mentioned in my last comment. Thanks a lot. </p> Ganesh SingadkarSun, 22 May 2016 07:51:11 -0000<b>Comment by Ganesh Singadkar on 2016-05-30 17:57</b><p>Hi Adam, I am using your feature selection toolbox in MATLAB. My feature vector is of size (2000x26). I have normalized the feature vector by applying vector normalization. But after applying the feature selection method to the normalized feature vector to select 10 best features out of 26 features, it gives the indices of first 10 features only ( like 1,2,3,4..10). I have no idea why it's giving output like this. Is it correct procedure or am I doing any mistake..? please help me to solve this problem. Thanks in advance </p> Ganesh SingadkarMon, 30 May 2016 17:57:57 -0000<b>Comment by Adam Pocock on 2016-05-30 18:47</b><p>Hi Ganesh,</p> <p>If by vector normalization you mean you've made each feature vector unit length then you're not using integer valued features which is necessary for FEAST.</p> <p>All inputs to FEAST should be integers, preferably from a small set of contiguous values. If your data is continuous you should convert it by binning it into 5 or 10 bins.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockMon, 30 May 2016 18:47:02 -0000<b>Comment by Ganesh Singadkar on 2016-05-30 19:37</b><p>Hi Adam, Thanks for the prompt response. By applying the normalization, I want to adjust the (GLCM Method) feature vector range between 0 to 1. But the biggest problem is that my original feature vector range is ranging from -0.5 to 2000, and I don't know how to adjust this range between 0 and 1 (is it necessary to adjust it in between 0 and 1..?). I have tried to apply different normalization methods, but it's affecting the result of the feature selection. Am I doing something wrong here? Please give me some hint to solve this problem. My feature vector range is vast in that case how to do the normalization and how to apply the feature selection stage to it. Thanks in advance, </p> Ganesh SingadkarMon, 30 May 2016 19:37:47 -0000<b>Comment by Adam Pocock on 2016-05-30 19:45</b><p>Hi Ganesh,</p> <p>FEAST expects the inputs to be integers, if you only give it values between 0 and 1 then they will be converted into just "0" and "1" by rounding. I recommend you convert each value into the range [0,10) and then discretise the values. You should apply this transform to each feature independently. If you subtract the minimum value from each feature then divide by the input range and multiply by the output range then this will convert each value into the correct range, at which point you can call floor() on each value to discretise it.</p> <p>Different normalisations will change the output of the feature selection, this is expected.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockMon, 30 May 2016 19:45:28 -0000<b>Comment by harsh joshi on 2016-05-31 07:36</b><p>Hi Adam, First of all Thanks for the excellent toolbox. I have feature vector of size (3000x40) in which first 1500 are from class 1 and next 1500 from class 2. I want to train this feature vector by applying SVM classifier ( I am planning to use LIBSVM tool box from I would like to can I use feature selection stage before training. Can I make the feature selection directly or I have to follow some procedure on the feature vector before the feature selection? Please tell me what steps I should follow before feature selection..? </p> <p>Thanks Harsh </p> harsh joshiTue, 31 May 2016 07:36:54 -0000<b>Comment by Adam Pocock on 2016-06-05 19:44</b><p>Hi Harsh,</p> <p>If your data is discrete you can directly apply FEAST, otherwise you will need to discretise it first. You don't have to use the discretised data in LibSVM, just for the feature selection.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSun, 05 Jun 2016 19:44:15 -0000<b>Comment by elina shakier on 2016-09-22 23:02</b><p>Hi Adam,</p> <p>Which function takes into account the correlation between features when is identifying the most significant one?</p> <p>Can you please advise about discretise method for the below range of the features?</p> <p>1 0 -0.1048 3.8500e 21 0 0 2 2 0 0 0 2 0 -0.0298 0.0552 6 0 0 0 0 1 1 0 1 0 0.0570 0.0173 6 1 1 0 0 0 0 0 2 0 0.0478 0.0872 18 0 0 1 1 0 0 0 1 0 0.0347 0.0925 21 0 0 1 1 0 0 1 2 0 0.0326 -0.0257 27 1 1 0 0 0 0 0 2 0 0.1134 0.0428 8 1 1 1 0.99 0 0 0 </p> <p>Thanks</p> <p>Elina</p> elina shakierThu, 22 Sep 2016 23:02:02 -0000<b>Comment by Adam Pocock on 2016-09-23 02:08</b><p>Hi Elina,</p> <p>Methods such as CMIM, JMI and mRMR explicitly take into account the correlations between features. CMIM and mRMR will reduce a feature's score if it is correlated with other already selected features, and JMI will both reduce it's score if it is correlated, and increase it if it combines well with already selected features.</p> <p>You should apply an independent discretisation to each feature, it doesn't need to be done with fixed parameters for a whole dataset. As I've mentioned before we've found 5 or 10 equal width bins to work pretty well for hundreds of datapoints, and you could use a few more bins if you have more data.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockFri, 23 Sep 2016 02:08:16 -0000<b>Comment by elina shakier on 2016-09-23 07:45</b><p>Hi Adam,</p> <p>Thank you for the fast reply!</p> <p>Do these methods take into account the linearity and non linearity correlation between the features?</p> <p>What should I do with confounding features in applying these methods?</p> <p>Do you recommnad feast or MIToolbox for features that have non linear and linear relationship?</p> <p>If I would like to know more details about these methods, do you recommend your journal paper ? Please let me know, if you know any other references too.</p> <p>Thanks</p> elina shakierFri, 23 Sep 2016 07:45:56 -0000<b>Comment by Adam Pocock on 2016-09-23 15:14</b><p>Hi Elina,</p> <p>All the mutual information based methods (everything except relief) are non-linear correlation methods. They all detect non-linear correlations between the features and the class, but only methods which use the conditional mutual information take into account non-linear correlations between groups of features and the class. The journal paper has a much fuller description of all the techniques and when they are appropriate.</p> <p>Confounding features are hard to detect with these methods, but JMI or CMIM is the best bet. CMIM is pretty similar to IAMB which is a proper structure learning algorithm which copes with confounding variables better (though it requires much more data).</p> <p>FEAST is a feature selection package which uses MIToolbox to provide mutual information functions, MIToolbox itself isn't a feature selection package.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockFri, 23 Sep 2016 15:14:33 -0000<b>Comment by elina shakier on 2016-10-06 19:45</b><p>Hi Adam,</p> <p>Thank you for the previous reply.</p> <p>I am wondering, why I get two high correlated features as the top one using mRMR and JMI, can you please advice?</p> <p>How can I check the stability of these algorithems?</p> <p>Also, can feast manage the database with 8967 features and 13674 examples on the server?</p> elina shakierThu, 06 Oct 2016 19:45:10 -0000<b>Comment by Adam Pocock on 2016-10-06 20:20</b><p>Hi Elina,</p> <p>I'm not sure what you mean by correlated features. Are you measuring the correlation using mutual information, pearson's linear correlation coefficient or something else? JMI may return correlated features, but only if they are predictive and have good class conditional correlations (which are beneficial to non-linear classification algorithms).</p> <p>For stability then there are the references in the journal paper, or some newer work by one of my advisor's other students <a href="">Sarah Nogueira</a>. I believe Sarah released Matlab code with her paper.</p> <p>FEAST should cope with a dataset that large if you don't ask for a full ranking of all the features. If you do then it will require a few more gigs of RAM but should execute fine (though it will take a lot longer). The first thing to try is to get the top 5 features using a given method, that should execute fairly quickly and will tell you if FEAST managed to process the data properly.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockThu, 06 Oct 2016 20:20:34 -0000<b>Comment by elina shakier on 2016-10-07 12:24</b><p>Hi Adam,</p> <p>Thank you. There is pairwise non linear and linear correlation between the features ( we have both). I am applying these algorithms for a practical application. The aim is to reduce the dependency between the features as much we can for identifying difference between two problems.</p> <p>I have tried JMI, CMIM and Mrmr. I am not sure, maybe I should only use CMIM? Should I?</p> <p>I have problem in the results interpretation ! For JMI, some of these top features are highly correlated, how should I deal with this as I should report the best top features that don't give the same information.</p> <p>Also, if we want to use wrapper method, when there is correlation between the top features that cause problem too?!</p> <p>Thanks</p> elina shakierFri, 07 Oct 2016 12:24:53 -0000<b>Comment by Adam Pocock on 2016-10-12 03:16</b><p>Hi Elina,</p> <p>If you really require no correlations between the top features then I'd use CMIM. JMI may return correlated feature sets, but in some cases these correlations are beneficial to the classification process (as class conditional correlations add information rather than reduce it).</p> <p>Wrappers are prone to the same problems as filters with respect to correlations, but in this case you don't get any values that describe the correlations. It's also much more important to get a good search algorithm than it is with a filter as the wrapper procedure is more expensive.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 12 Oct 2016 03:16:57 -0000<b>Comment by elina shakier on 2016-10-12 16:37</b><p>Thanks Adam,</p> <p>If I use CMIM, how should I compare the difference between the top features? For example, how much important is feature 1 than feature 2?</p> <p>Regards</p> elina shakierWed, 12 Oct 2016 16:37:30 -0000<b>Comment by Adam Pocock on 2016-10-12 17:14</b><p>Hi Elina,</p> <p>Unfortunately FEAST doesn't return it's internal scores for features, so you'd have to calculate this after the fact.</p> <p>You can directly calculate the CMIM score for each feature (for the first selected feature it's I(F<em>1;Y), for all others it's min</em>{i &lt; t} (I(F<em>t;Y|F</em>i), I(F_t;Y)).</p> <p>There is some example code in MIToolbox that runs CMIM in Matlab which you could modify to produce this output, but it's not as well tested as FEAST is, so it might do odd things.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 12 Oct 2016 17:14:54 -0000<b>Comment by elina shakier on 2016-10-20 18:01</b><p>Hi Adam,</p> <p>Thank you. I realy need to get the score for each fearure as I need to to know the difference between them. When you do feature ranking you possibely get the rank from the lowest to hight value. </p> <p>I tried to modify the cmi.m in MIToolbox but I was not successful . Can you please help more.</p> <p>Thanks</p> <p>Elina</p> elina shakierThu, 20 Oct 2016 18:01:21 -0000<b>Comment by Adam Pocock on 2016-10-20 19:03</b><p>Hi Elina,</p> <p>Make an issue on the <a href="">FEAST Github</a> page, and we'll take the discussion there. It's easier to refer to the source code that way.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockThu, 20 Oct 2016 19:03:57 -0000<b>Comment by elina shakier on 2016-10-20 21:14</b><p>Hi Adam,</p> <p>Thanks, I created an issues.</p> <p></p> <p>Elina</p> elina shakierThu, 20 Oct 2016 21:14:52 -0000<b>Comment by elina shakier on 2016-11-07 13:28</b><p>Hi Adam,</p> <p>To use feast for feature selection, I split data in training and testing parts. I have a large dataset (3000 examples), do you suggest cross validation or bootstrap? If bootstrap, how many of observations should be resampled?</p> <p>Thanks</p> elina shakierMon, 07 Nov 2016 13:28:50 -0000<b>Comment by Adam Pocock on 2016-11-07 15:36</b><p>Hi Elina,</p> <p>I'd use 10 fold cross validation rather than a bootstrap, but that's my personal preference, either method should work fine.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockMon, 07 Nov 2016 15:36:40 -0000<b>Comment by elina shakier on 2017-02-08 10:34</b><p>Hi Adam,</p> <p>Is there any relationship between 'feast' algorithems and Random Forest ((TreeBagger) in Matlab? Can we get the same top features?</p> <p>Thanks</p> <p>Elina</p> elina shakierWed, 08 Feb 2017 10:34:21 -0000<b>Comment by Adam Pocock on 2017-02-09 02:16</b><p>Hi Elina,</p> <p>The features generated by an RF and by FEAST will usually be different. It's possible they could be similar if there is a small set of relevant features and you ignore the rank order, but usually you'll get quite different answers.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockThu, 09 Feb 2017 02:16:14 -0000<b>Comment by elina shakier on 2017-02-13 16:50</b><p>Thanks Adam.</p> <p>Does make sense to do feature selection ( feast) before random forest?</p> <p>We can use random forest either for the feature selection and prefiction.</p> <p>Thanks</p> <p>Elina</p> elina shakierMon, 13 Feb 2017 16:50:03 -0000<b>Comment by Adam Pocock on 2017-02-14 02:46</b><p>Hi Elina,</p> <p>I probably wouldn't use feature selection before a random forest unless my data was extremely sparse. It shouldn't hurt performance if you do, but I tend to prefer gradient boosted trees as my classifier (and feature selection seems more likely to be useful there).</p> <p>Thanks,</p> <p>Adam</p> Adam PocockTue, 14 Feb 2017 02:46:49 -0000<b>Comment by elina shakier on 2017-02-15 16:22</b><p>Thanks Adam,</p> <ol> <li><p>How can I check if the data is sparse? Can you please clarify more the second sentences and also the performance part? As I am aware Random forest is a bagging model, do you mean if I use boosted trees(Adaboost), features selection (feast) is useful to be done before that ? </p></li> <li><p>If we do n fold cross validation, as the top features vary in each fold, does it make sense to compute the mutual information score for each feature in each fold and take the average of scores overall n folds? So, the feature that has the highest average score is the best one?</p></li> <li><p>Is there any advantages to use wrapper method after mutual information techniques? Do you know any techniques to do feature selection for batches of features ?</p></li> </ol> <p>Thanks Elina</p> elina shakierWed, 15 Feb 2017 16:22:35 -0000<b>Comment by Adam Pocock on 2017-02-15 17:50</b><p>Hi Elina,</p> <p>If you don't know your data is sparse, it probably isn't. Feature selection before a random forest reduces the amount of variability in the data, and high variability is part of the way that a random forest reduces variance (and thus improves classification performance). Boosted trees reduce bias so are less reliant upon having variability. The two statements before are pretty crude exaggerations of why ensemble methods work, I recommend you read the ensemble methods chapters of <a href="">The Elements of Statistical Learning</a> for a proper explanation.</p> <p>I wouldn't recommend averaging the mutual information scores across folds when using more complicated techniques than MIM. Doing that will tie together the folds and leak information between them, which might taint any stats tests you do on the cross validated output.</p> <p>There are definite advantages for using wrappers after mutual information techniques. MI based filters are good for describing datasets and finding generally useful sets of features. To optimise performance with a specific classifier then a wrapper based on that classifier will always find a better feature set as it's optimising that classifier's loss function.</p> <p>For batches of features you could look at things like the group lasso, but I don't know too much about those techniques.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 15 Feb 2017 17:50:46 -0000<b>Comment by elina shakier on 2017-02-15 23:42</b><p>Thanks Adam for the good explanation,</p> <p>I am wondering how can I deal with top features variability in cross validation when I am applying (JMI, Mrmr, and CMIM). The top features vary in each fold! Do you have any suggestions if averaging is not a good idea?</p> <p>In addition, is applying wrapper to ensemble method right thing to do?</p> <p>Thanks Elina</p> elina shakierWed, 15 Feb 2017 23:42:16 -0000<b>Comment by nick joe on 2017-03-12 18:25</b><p>Hi Adam,</p> <p>How Feast deal with imbalanced data?</p> <p>Thanks</p> nick joeSun, 12 Mar 2017 18:25:19 -0000<b>Comment by Adam Pocock on 2017-03-13 01:15</b><p>Hi,</p> <p>FEAST doesn't do anything special for imbalanced data. The mutual information that underlies FEAST should take into account all the labels. If your dataset is really unbalanced try using the weighted feature selection algorithms and put a high weight on the minority class.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockMon, 13 Mar 2017 01:15:57 -0000<b>Comment by Ilkka Rautiainen on 2017-07-19 15:24</b><p>Hi Adam,</p> <p>I'm trying to get some basic understanding of the feature scores provided by FEAST. These are the issues I'm currently having trouble with:</p> <p>1) The top feature seems to be the same (at least with the two datasets I've experimented with and their subsets) when using different methods (CMIM, JMI, DISR). This alone isn't that suspicious, and I'm more concerned about the following points. 2) The top feature score is exactly the same with the three methods mentioned above. This seems to be true even when different subsets are selected from the datasets. Is it a coincidence that the top score always seems to be exactly same for different algorithms? 3) With DISR the score of first feature (0.5849) doesn't seem to fit the pattern of increasing or decreasing scores [0.5849;0.1548;0.2972;0.4586;0.6215]. How should this top score be interpreted?</p> <p>I'm seeing this behavior with the real dataset I'm working on and with a basic MATLAB 'ovariancancer' sample dataset. I'm using FEAST 2.0.0 and MIToolbox 3.0.1 with MATLAB R2016b on a Windows 10 machine.</p> <p>An overview of the FEAST feature data for 'ovariancancer' dataset is as follows:</p> <pre><code>FEAST method, Selected indices, Feature scores 'cmim', [2814;3080;950;2337;2731], [0.5849;0.1765;0.1701;0.1624;0.1570] 'jmi', [2814;2735;2644;2336;2731], [0.5849;0.7782;1.4733;2.0527;2.7469] 'disr', [2814;679;3041;3032;3040], [0.5849;0.1548;0.2972;0.4586;0.6215] </code></pre> <p>This data can be reproduced with the following MATLAB code:</p> <pre><code>%Example code using MATLAB sample data 'ovariancancer': load ovariancancer.mat; labels = grp2idx(grp); feast_methods = {'cmim', 'jmi', 'disr'}; obs_discretized = zeros(size(obs,1), size(obs,2)); for ii=1:size(obs,2) [Y,~] = discretize(obs(:,ii), 10); %Discretize data to 10 uniform bins obs_discretized(:,ii) = Y; end selections = struct('feast_method', 'NaN', 'indices', {'NaN'}, 'scores', {'NaN'}); for ii=1:size(feast_methods, 2) [selected_indices, feature_scores] = feast(feast_methods(ii), 5, obs_discretized, labels); %Get 5 features selections(ii).feast_method = feast_methods(ii); selections(ii).indices = selected_indices; selections(ii).scores = feature_scores; end </code></pre> <p>Thanks!</p> Ilkka RautiainenWed, 19 Jul 2017 15:24:51 -0000<b>Comment by Adam Pocock on 2017-07-23 00:00</b><p>Hi Ilkka,</p> <p>This is expected behaviour. All the feature selection algorithms in FEAST use the mutual information to score the first feature, and they select the one that scores the highest. After the first feature they diverge by using the specific scoring criterion given in that algorithm. With DISR the score is the unnormalised mutual information, and with each feature after that it's the score normalised by the joint entropy (which is probably going to shrink the score). </p> <p>Have a look through the associated journal paper, it goes through the differences in some detail, and should give you some intuition for what each criterion will do.</p> <p>Thanks,</p> <p>Adam</p> Adam PocockSun, 23 Jul 2017 00:00:29 -0000<b>Comment by Sarah Khan on 2017-09-06 10:45</b><p>Hi, I compiled MIToolbox and it worked just fine; however, when I try to compile FEAST, I get the following errors </p> <p>Error using mex C:\Users\src\BetaGamma.c not found; check that you are in the correct current folder, and check the spelling of 'C:\Users\src\BetaGamma.c'.</p> <p>Error in CompileFEAST (line 4) mex -I../../MIToolbox/include -I../include FSToolboxMex.c ../src/BetaGamma.c ../src/CMIM.c ../src/CondMI.c ../src/DISR.c ../src/ICAP.c ../src/JMI.c ../src/mRMR_D.c ../../MIToolbox/src/MutualInformation.c ../../MIToolbox/src/Entropy.c ../../MIToolbox/src/CalculateProbability.c ../../MIToolbox/src/ArrayOperations.c</p> <p>Any help would be appreciated. </p> Sarah KhanWed, 06 Sep 2017 10:45:16 -0000<b>Comment by Adam Pocock on 2017-09-06 21:17</b><p>Hi Sarah,</p> <p>It looks like you're running CompileFEAST from your username directory on Windows, rather than from the FEAST/matlab directory. Could you check where you are running the script from?</p> <p>Thanks,</p> <p>Adam</p> Adam PocockWed, 06 Sep 2017 21:17:02 -0000