summaryrefslogtreecommitdiff
path: root/calc_error.m
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 11:33:25 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-11 11:33:25 +0200
commitadecf91d28868fe604fb0db9984bbe609d567aca (patch)
treead98bb6ecccf7b0c0734a6519dec7c90741ed3c3 /calc_error.m
parentf38c08a5b555a846a0d4c224f617b08ffd86a28d (diff)
downloaddmc-adecf91d28868fe604fb0db9984bbe609d567aca.tar.gz
dmc-adecf91d28868fe604fb0db9984bbe609d567aca.tar.bz2
dmc-adecf91d28868fe604fb0db9984bbe609d567aca.zip
Put local error calculation into calc_error
Diffstat (limited to 'calc_error.m')
-rw-r--r--calc_error.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/calc_error.m b/calc_error.m
index 7204715..2f7e9c6 100644
--- a/calc_error.m
+++ b/calc_error.m
@@ -1,7 +1,8 @@
-function [quad, total] = calc_error(name, data, pred)
+function [quad, total, local] = calc_error(name, data, pred)
quad = quad_error(data, round(pred));
total = total_error(data, round(pred));
+ local = sum(abs(data - round(pred)));
printf('%-11s quad: %d\t total: %d\n', name, quad, total);