aboutsummaryrefslogtreecommitdiff
path: root/FEAST/FSToolbox/MIM.m
diff options
context:
space:
mode:
Diffstat (limited to 'FEAST/FSToolbox/MIM.m')
-rw-r--r--FEAST/FSToolbox/MIM.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/FEAST/FSToolbox/MIM.m b/FEAST/FSToolbox/MIM.m
new file mode 100644
index 0000000..31695e4
--- /dev/null
+++ b/FEAST/FSToolbox/MIM.m
@@ -0,0 +1,17 @@
+function [selectedFeatures scoreVector] = MIM(k, data, labels)
+%function [selectedFeatures scoreVector] = MIM(k, data, labels)
+%
+%Mutual information Maximisation
+%
+% The license is in the license.txt provided.
+
+numf = size(data,2);
+classMI = zeros(numf,1);
+
+for n = 1 : numf
+ classMI(n) = mi(data(:,n),labels);
+end
+
+[scoreVector index] = sort(classMI,'descend');
+
+selectedFeatures = index(1:k);