|
Algorithm 1 Recursive entropy estimator |
-
1:
functioncopulaH(, D, N, )
-
2:
-
3:
for
k = 1 to D
do
-
4:
rank()/N ▹ Calculate rank (by sorting)
-
5:
H1D(, N, ) ▹ entropy of marginal k
-
6:
end for
-
7:
-
8:
if
or min #samples then
-
9:
return
H
-
10:
end if
-
11:
-
12:
▹A is the matrix of pairwise independence
-
13:
true if and are statistically independent
-
14:
# of blocks in A.
-
15:
if
then ▹ Split dimensions
-
16:
for
to
do
-
17:
elements in block j
-
18:
copulaH(,dim(v),N,)
-
19:
end for
-
20:
return
H
-
21:
else ▹ No independent blocks
-
22:
choose a dim for splitting
-
23:
-
24:
-
25:
copulaH(,D,,) /2
-
26:
-
27:
-
28:
-
29:
copulaH(,D,,) /2
-
30:
end if
-
31:
end function
|