Skip to main content
. Author manuscript; available in PMC: 2023 Jan 25.
Published in final edited form as: Proceedings (IEEE Int Conf Bioinformatics Biomed). 2021 Dec;2021:470–477. doi: 10.1109/bibm52615.2021.9669654

Algorithm 1.

Construction of PhyNN

Input: Phylogenetic tree T
   Bandwidth b
   Hyperparameter H for MLP
Divide T into K = ⌈h/b⌉ bands B1, . . ., BK
for k = K to 2 do
for j = 1 to |Bk| do
  if A(Nkj) is not NULL then
   S(A(Nkj)) ← S(A(Nkj)) ∪ {Nkj}
  else
   Insert a new (pseudo) node Nk1,Bk1+1 to Bk−1 SNk1,Bk1+1Nkj
  end if
end for
for j = 1 to |Bk−1| do
  vkj ← NULL vector
  for N in S(Nk−1,j) do
   if V(N) is not NULL then
    vkj ← [vkj, V(N)] (append V(N) to vkj)
   end if
  end for
  if vkj is not NULL vector then
   VNk1,jfkj(H)vkj
  end if
end for
end for
v11 ← NULL vector
for N in B1 do
if V(N) is not NULL then
  v11 ← [v11, V(N)] (append V(N) to v11)
end if
end for
zf11(H)v11
Output: The PhyNN model f that accepts the abundances on all leaf nodes as input and yields z as output