From 031f9ecc989d177215bc85e1827cf1d72db07643 Mon Sep 17 00:00:00 2001 From: Jan Klemkow Date: Thu, 10 May 2012 11:17:24 +0200 Subject: Add a method for random prediction. This method show the distace from nonsence to the other methods. It uses the variance of each product for prediction. --- rand_pred.m | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 rand_pred.m (limited to 'rand_pred.m') diff --git a/rand_pred.m b/rand_pred.m new file mode 100644 index 0000000..5ed4be3 --- /dev/null +++ b/rand_pred.m @@ -0,0 +1,8 @@ +function pred = rand_pred(data, times) + + pred = abs(normrnd(mean(data), sqrt(var(data)))); + + for i = 1:(times-1) + pred = [ pred; abs(normrnd(mean(data), sqrt(var(data))))]; + end +end -- cgit