-
Notifications
You must be signed in to change notification settings - Fork 14
/
deltaElimination.m
83 lines (74 loc) · 2.85 KB
/
deltaElimination.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
function PF = deltaElimination(PF0,delta)
% Performs delta elimination to select QEISS from initial pareto front.
% The QEISS are those with accuracy at most delta% smaller than the highest one.
%
% Reference: Karakaya, G., Galelli, S., Ahipasaoglu, S.D., Taormina, R., 2015.
% Identifying (Quasi) Equally Informative Subsets in Feature Selection Problems
% for Classification: A Max-Relevance Min-Redundancy Approach.
% IEEE Trans. Cybern. doi:10.1109/TCYB.2015.2444435
%
%
%
%
% Copyright 2015 Riccardo Taormina ([email protected]),
% Gulsah Karakaya ([email protected];),
% Stefano Galelli ([email protected]),
% and Selin Damla Ahipasaoglu ([email protected];.
%
% Please refer to README.txt for further information.
%
%
% This file is part of Matlab-Multi-objective-Feature-Selection.
%
% Matlab-Multi-objective-Feature-Selection is free software: you can redistribute
% it and/or modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation, either version 3 of the
% License, or (at your option) any later version.
%
% This code is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with MATLAB_IterativeInputSelection.
% If not, see <http://www.gnu.org/licenses/>.
%
% initialize output as input (eliminate entries later)
fvals = PF0.fvals;
fvals_ext = PF0.fvals_ext;
archive = PF0.archive;
tempArchive = archive;
% extract accuracies for delta elimination
accuracies = -(fvals_ext(:,3));
% find best value of metric
bestValue = max(accuracies);
delta = (delta/100);
% in this array 1 will identify solution to be eliminated
ixesToRemove = zeros(size(tempArchive,1),1);
% proceed with delta elimination
for i = 1 : numel(tempArchive)
if accuracies(i) < (1-delta)*bestValue;
% remove, it's inferior
ixesToRemove(i) = 1;
else
% eliminate inferior subsets
Si = tempArchive{i};
for j = 1 : numel(tempArchive)
if (j == i) || (ixesToRemove(j) == 1)
% continue loop if solution already removed of
% if comparing same solutions
continue
end
Sj = tempArchive{j};
if isequal(intersect(Si,Sj),Sj) &&...
(accuracies(j)>accuracies(i))
% remove solution if inferior
ixesToRemove(i) = 1;
end
end
end
end
PF.fvals = fvals(~ixesToRemove,:);
PF.fvals_ext = fvals_ext(~ixesToRemove,:);
PF.archive = archive(~ixesToRemove);