summaryrefslogtreecommitdiff
path: root/run_tests.m
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2012-05-07 03:42:11 +0200
committerJan Klemkow <j.klemkow@wemelug.de>2012-05-07 03:42:11 +0200
commit9673ff90c642d0344238d710b7c7501c48d43931 (patch)
treef31b7957fe236b16a1d8ff8425cca2a03af7b34b /run_tests.m
parenteffe95641d24a389bd11b14f5f4bdc5286ba0408 (diff)
downloaddmc-9673ff90c642d0344238d710b7c7501c48d43931.tar.gz
dmc-9673ff90c642d0344238d710b7c7501c48d43931.tar.bz2
dmc-9673ff90c642d0344238d710b7c7501c48d43931.zip
Add sevenday prediction.
Diffstat (limited to 'run_tests.m')
-rw-r--r--run_tests.m14
1 files changed, 10 insertions, 4 deletions
diff --git a/run_tests.m b/run_tests.m
index 52f7f05..4f56094 100644
--- a/run_tests.m
+++ b/run_tests.m
@@ -1,10 +1,16 @@
[p, q] = get_products();
+
quad = quad_error(q(29:42, :), mean_pred(q(1:28, :), 14));
total = total_error(q(29:42, :), mean_pred(q(1:28, :), 14));
-printf('quad mean : %9d\n', quad);
-printf('total mean : %9d\n', total);
+printf('quad mean : %9d\n', quad);
+printf('total mean : %9d\n', total);
quad = quad_error(p(29:42, :), regress_pred(p, q(1:28, :)));
total = total_error(p(29:42, :), regress_pred(p, q(1:28, :)));
-printf('quad regress : %9d\n', quad);
-printf('total regress: %9d\n', total);
+printf('quad regress : %9d\n', quad);
+printf('total regress : %9d\n', total);
+
+quad = quad_error(q(29:42, :), repmat(sevenday_pred(q(1:28, :), 4), 2, 1));
+total = total_error(q(29:42, :), repmat(sevenday_pred(q(1:28, :), 4), 2, 1));
+printf('quad sevenday : %9d\n', quad);
+printf('total sevenday: %9d\n', total);