Implement a simple loop that trains an NMF topic model, for number of topics from 2 to 10 inclusive. At each iteration, compute your topic coherence measure on the top 10 words for each topic. Then compute the median topic coherence over all these topic scores.
Your function should return a list of 9 median coherence scores, corresponding to each choice of the number of topics to use with N
MF.