summaryrefslogtreecommitdiff
path: root/classify.m
blob: e5595685e3fdc137fd95a62123b3d255708ef895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
run_tests;

train_data = q(1:42, :);
pred_list_class = {};
for i = 1:num_methods
	pred_list_class{i} = pred_methods(i).func(pall, train_data);
end

opt_class_data = round(opt_pred(method_idx, pred_list_class));
plot(sum(normalize(pall)') + 5000, '-og', sum(pall'), '-om', sum(q'), '-ok',
     43:56, sum(opt_class_data'), '-ok', 29:42, sum(opt_data'), '-om')


%classified_data = round((opt_class_data)'(:));
file = fopen('TeamFK_task1.txt', 'w');
fprintf(file, 'day|itemID|price|quantity');
for day = 43:56
	for itemID = 1:570
		fprintf(file, '\r\n%d|%d|%.2f|%d',
			day, itemID,
			pall(day, itemID), opt_class_data(day-42, itemID));
	end
end
fclose(file);