Mercurial > hg > camir-ismir2012
comparison core/tools/machine_learning/cut_Y.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cc4b1211e677 |
---|---|
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 |