Skip to main content
. 2020 Feb 11;22(2):204. doi: 10.3390/e22020204
Algorithm A1 Binary tree. Single feature generation
  1.  Compute N=Nleaves, n=Nnotleaves. M is a free parameter
  2.
  3.  tree = 0N
  4.
  5.  Define a small εO(101) as probabilistic threshold
  6.
  7.  Value of root η(0)U({1,+1})
  8.
  9.  if Root node has value +1 then
10.
11.   The left child inherits the value +1
12.
13.   And the right child inherits the value 1
14.
15.  else
16.
17.   The left child inherits the value 1
18.
19.   And the right child inherits the value +1
20.
21.  end if
22.
23.  for All the other nodes indexed i=1,,n do
24.
25.   if Node i has +1 value then
26.
27.    Sample pU([0,1])
28.
29.    if p>ε then
30.
31.       Left child of i = +1; Right child of i = 1
32.
33.    else
34.
35.       Left child of i = 1; Right child of i = +1
36.
37.    end if
38.
39.   else
40.
41.    Both the children of i inherit its 1 value
42.
43.   end if
44.
45.  end for
46.
47.  xμ values generated, μ=1,,M
48.