]>Gene Tree Labeling Using Nonnegative Matrix Factorization on Biomedical Literature : Algorithm 1
Input: MeSH Term-by-Document Matrix 𝐴 𝑚 × 𝑛
Factor Matrices 𝑊 𝑚 × 𝑘 and 𝐻 𝑘 × 𝑛 of original Term-by-Document Matrix 𝐴 𝑚 × 𝑛
Global weight vector 𝑔 ,
Threshold 𝑟 number of MeSH headings to represent each document
Output: MeSH feature matrix 𝑊
for 𝑖 = 1 𝑛 do
      Choose 𝑟 top globally-weighted MeSH headings from 𝑖 th column of 𝐴
      Determine 𝑗 = a r g m a x 𝑗 < 𝑘 𝐻 𝑗 𝑖
      for = 1 𝑟 do
            Parse MeSH heading into tokens
            Add each token 𝑡 with index 𝑝 to 𝑤 𝑗 , the 𝑗 th column of 𝑊
i.e., 𝑊 𝑝 𝑗 = 𝑊 𝑝 𝑗 + 𝑔 𝑝 × 𝐻 𝑗 𝑖
      end for
end for
Algorithm 1: Feature vector replacement algorithm.