summaryrefslogtreecommitdiff
path: root/report/pyp_clustering/acl09-short/code/crppred.m
blob: 17f22652caee48ff25edc663242dda7b84986a00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function output = crppred(input,b)

uniqin = unique(input);
prediction = zeros(max(input),1);

p0=1/30114;
for i = 1:length(uniqin)
  prediction(uniqin(i)) = b*p0*sum(1./((1:uniqin(i))+b*p0-1));
end

output = prediction(input);