[95bb1e]: / Xsys_MT_cal.m

Download this file

14 lines (11 with data), 354 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
function [Xsys_MT] = Xsys_MT_cal(Xs, ys)
%Calculate Xty for each task and arrange them according to both the orders
%of the features and the tasks
Xsys_MT = zeros(size(Xs{1},2)*length(Xs),1);
idx_row = (0:size(Xs{1},2)-1)*length(Xs)+1;
for i = 1 : length(Xs)
Xty = (Xs{i})'*(ys{i});
Xsys_MT(idx_row,1) = Xty;
idx_row = idx_row + 1;
end
end