From a2ef6de02ce62d2d2d878632cb52099e6e4c227f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 12 May 2012 13:48:44 +0200 Subject: classify: Print classified table to file --- classify.m | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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); -- cgit