comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function r = cut_Y(r, valid_idx)
2 % disables the invalid parts of the ranking structure Y
3
4 % get indices not mentioned
5 u = find(~valid_idx);
6
7 % clear bad data
8 for i = 1 : numel(u)
9
10 r{u(i), 1} = [];
11 r{u(i), 2} = [];
12 end
13
14 % also clear weights if applicable
15 if size(r,2) == 3
16 for i = 1 : numel(u)
17 r{u(i), 3} = 0;
18 end
19 end
20 end