| 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 do |
| Choose top globally-weighted MeSH headings from th column of |
| Determine |
| for do |
| Parse MeSH heading into tokens |
| Add each token with index to , the th column of |
| i.e., |
| end for |
| end for |