Mercurial > hg > camir-aes2014
annotate core/tools/machine_learning/cut_Y.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function r = cut_Y(r, valid_idx) |
wolffd@0 | 2 % disables the invalid parts of the ranking structure Y |
wolffd@0 | 3 |
wolffd@0 | 4 % get indices not mentioned |
wolffd@0 | 5 u = find(~valid_idx); |
wolffd@0 | 6 |
wolffd@0 | 7 % clear bad data |
wolffd@0 | 8 for i = 1 : numel(u) |
wolffd@0 | 9 |
wolffd@0 | 10 r{u(i), 1} = []; |
wolffd@0 | 11 r{u(i), 2} = []; |
wolffd@0 | 12 end |
wolffd@0 | 13 |
wolffd@0 | 14 % also clear weights if applicable |
wolffd@0 | 15 if size(r,2) == 3 |
wolffd@0 | 16 for i = 1 : numel(u) |
wolffd@0 | 17 r{u(i), 3} = 0; |
wolffd@0 | 18 end |
wolffd@0 | 19 end |
wolffd@0 | 20 end |