Reprint Please specify the original address:http://www.cnblogs.com/connorzx/p/4170047.html to give reasons
The processing of text and vocabularies based on the cosine theorem requires too many iterations (see Chapter 14 Notes for details), in order to find a one step method, singular value decomposition (SVD decomposition) can be used.
Algorithm implementation
Set up a m-by-n matrix A, where rows represent M-articles, and columns represent n-words. AIJ represents the weighted word frequency that appears in article I of the first J words. The singular value of a is decomposed, a=xby,x is the m-by-r matrix, B is the R-order phalanx and Y is the r-by-n matrix. If r<<m,n, the amount of storage and calculation can be reduced by several orders of magnitude.
PS. Here the SVD algorithm is actually thin SVD.
PS2. The most ingenious is that the three matrices after the singular value decomposition have corresponding physical meanings. X indicates the relevance of the article and the subject class, and B denotes the relevance of the subject class and the meaning class, and y denotes the relevance of the lexical meaning class and the word. (saying that this so-called physical meaning is not so good to come out O (╯-╰) o)
Add
The thin SVD can be used to quickly classify text or vocabulary, but the classification results are rather rough. At this point, a more granular classification can be made using the cosine theorem iterative method.
"The Beauty of Mathematics" chapter 15th application of--SVD decomposition of two classification problems in matrix calculation and text processing