danielhomola / mifs

Parallelized Mutual Information based Feature Selection module.
BSD 3-Clause "New" or "Revised" License
289 stars 110 forks source link

Information changes (increases/decreases) upon adding duplicate features #31

Open zuranski opened 4 years ago

zuranski commented 4 years ago

Hello authors,

I was analyzing the performance of the mifs feature selection and stumbled on a strange property. My features are continuous, my target is categorical. In my design matrix I accidentally used one pair of duplicate features, but to my surprise they were often both selected by the algorithm (I used JMIM). I managed to trace it to a property of the function _mi_dc(x, y, k). For features 1, 2, 3, with 1, 2 being exactly the same I obtained the following results of the _mi_dc (data attached):

Unless I don't understand some aspect of the calculation, it looks like adding a strictly redundant feature confuses the MI calculation. Could this be rectified? Or maybe there are some alternative options of calculating the joint MI? Of course one can detect that and skip exact duplicates, but it makes me a little hesitant about using the algorithm with many closely related features.

All my best, Andrzej

mifs_data.txt