summaryrefslogtreecommitdiff
path: root/opt_pred.m
blob: 26e8df8317d35504d4f0536e6573e4fbf793cc72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function pred = opt_pred(real_data, pred_list)

	err_list = [];

	for i = 1:size(pred_list, 2)
		err_list = [err_list; sum(abs(real_data - pred_list{i}))];
	end

	[min_err, idx] = min(err_list);

	pred = [];

	for i = 1:size(idx, 2)
		pred = [pred pred_list{idx(i)}(:,i)];
	end
end