Visualize documents in a 2D map
visualizedocuments( DP,ALPHA,S,NCHARS,MAXLINES ) takes the document strings in S and the document-topic count matrix DP where DP(i,j) contains the number of times a word in document i has been assigned to topic j. These counts are transformed to probability distributions over topics for each document. For each document pair, the symmetrized Kullback Leibler distance between topic distributions is calculated. Classical multidimensional scaling is used to visualize all pairwise document distances in a 2D map.
look at exampleVIZ2.m for an example script utilizing this function
The variable NCHARS limits the number of characters on one line within a text box
The variable MAXLINES limited the number of lines within a text box. calculate prob distribution over documents for each topic