P = "in" P = "* of" P = "of *" P = "* *" freq("quart P volume") 4 1 5 19 freq("volume P quart") 10 0 2 16 more weight to columns (patterns) with frequencies that vary substantially from one row (word pair) to the next, and less weight to columns that are uniform.
to reduce the amount of computation required, we first find the 30 nearest neighbors for each pair, ignoring the alternate pairs (600 × 599 = 359, 400 cosines), and then apply the full LRA, including the alternates, to just those 30 neighbors (600 × 30 × 16 = 288, 000 cosines), which requires calculating only 359, 400 + 288, 000 = 647, 400 cosines.