summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-12 13:48:44 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-12 13:48:44 +0200
commita2ef6de02ce62d2d2d878632cb52099e6e4c227f (patch)
treef16bacda3bb18e9799b1b8014f342ef2b3673212
parent75fae3057d735a8d08cc78a249d53c8ba62d92a8 (diff)
downloaddmc-a2ef6de02ce62d2d2d878632cb52099e6e4c227f.tar.gz
dmc-a2ef6de02ce62d2d2d878632cb52099e6e4c227f.tar.bz2
dmc-a2ef6de02ce62d2d2d878632cb52099e6e4c227f.zip
classify: Print classified table to file
-rw-r--r--classify.m14
1 files changed, 13 insertions, 1 deletions
diff --git a/classify.m b/classify.m
index 1353e6a..e559568 100644
--- a/classify.m
+++ b/classify.m
@@ -6,7 +6,19 @@ for i = 1:num_methods
pred_list_class{i} = pred_methods(i).func(pall, train_data);
end
-opt_class_data = opt_pred(method_idx, pred_list_class);
+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);