diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-12 11:27:51 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-12 11:27:51 +0200 |
commit | 72fe1a735c2e31ef1fe3150bb2f83cb5638e86dc (patch) | |
tree | 4dc123a41a4af2945a0a814cb8fcdf0d1dc449ab | |
parent | 8c209cee71a2b1ff2ad36e88dd08647479c1ea3d (diff) | |
download | dmc-72fe1a735c2e31ef1fe3150bb2f83cb5638e86dc.tar.gz dmc-72fe1a735c2e31ef1fe3150bb2f83cb5638e86dc.tar.bz2 dmc-72fe1a735c2e31ef1fe3150bb2f83cb5638e86dc.zip |
get_products: Return the real price classification set as well
-rw-r--r-- | get_products.m | 9 | ||||
-rw-r--r-- | run_tests.m | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/get_products.m b/get_products.m index 11403dc..eed1c00 100644 --- a/get_products.m +++ b/get_products.m @@ -1,7 +1,8 @@ function [A,B] = get_products() load('-ascii', 'train_noheader.csv'); + load('-ascii', 'class_noheader.csv'); - A = zeros(42, 570); + A = zeros(42+14, 570); B = zeros(42, 570); for i = 1:42 begin = 570 * (i-1) + 1; @@ -9,4 +10,10 @@ function [A,B] = get_products() A(i,:) = train_noheader(begin:ende,3)'; B(i,:) = train_noheader(begin:ende,4)'; end + for i = 43:56 + begin = 570 * (i-42-1) + 1; + ende = begin + 569; + A(i,:) = class_noheader(begin:ende,3)'; + end + endfunction diff --git a/run_tests.m b/run_tests.m index 87b16e7..3931139 100644 --- a/run_tests.m +++ b/run_tests.m @@ -1,8 +1,9 @@ -[p, q] = get_products(); +[pall, q] = get_products(); % quantity sum over a day %plot(sum(q')); +p = pall(1:42, :); train_data = q( 1:28, :); real_data = q(29:42, :); |