diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-27 16:13:19 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-27 16:13:19 +0000 |
commit | fd519b0e45c857b266814994ba8c1421f508e522 (patch) | |
tree | 6d50c9b954e3c13e9df627c1ecc25c53544a5f58 /report/pyp_clustering/acl09-short/code/noP0pred.m | |
parent | 4c5df460c9da5c935438850ef7993463a9113286 (diff) |
preso
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@435 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'report/pyp_clustering/acl09-short/code/noP0pred.m')
-rw-r--r-- | report/pyp_clustering/acl09-short/code/noP0pred.m | 11 |
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); + |