summaryrefslogtreecommitdiff
path: root/report/pyp_clustering/acl09-short/code/noP0pred.m
diff options
context:
space:
mode:
Diffstat (limited to 'report/pyp_clustering/acl09-short/code/noP0pred.m')
-rw-r--r--report/pyp_clustering/acl09-short/code/noP0pred.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/report/pyp_clustering/acl09-short/code/noP0pred.m b/report/pyp_clustering/acl09-short/code/noP0pred.m
new file mode 100644
index 00000000..f72f1432
--- /dev/null
+++ b/report/pyp_clustering/acl09-short/code/noP0pred.m
@@ -0,0 +1,11 @@
+function output = antoniakpred(input,b)
+
+uniqin = unique(input);
+prediction = zeros(max(input),1);
+
+for i = 1:length(uniqin)
+ prediction(uniqin(i)) = b*log((b+uniqin(i))/b);
+end
+
+output = prediction(input);
+