learn then corresponds to one topicand the coefficients of the components in the representation of document tell us how strongly related that document is to particular topic oftenwhen people talk about topic modelingthey refer to one particular decomposition method called latent dirichlet allocation (often lda for short latent dirichlet allocation intuitivelythe lda model tries to find groups of words (the topicsthat appear together frequently lda also requires that each document can be understood as "mixtureof subset of the topics it is important to understand that for the machine learning model "topicmight not be what we would normally call topic in everyday speechbut that it resembles more the components extracted by pca or nmf (which we discussed in )which might or might not have semantic meaning even if there is semantic meaning for an lda "topic"it might not be something we' usually call topic going back to the example of news articleswe might have collection of articles about sportspoliticsand financewritten by two specific authors in politics articlewe might expect to see words like "governor,"vote,"party,etc while in sports article we might expect words like "team,"score,and "season words in each of these groups will likely appear togetherwhile it' less likely thatfor example"teamand "governorwill appear together howeverthese are not the only groups of words we might expect to appear together the two reporters might prefer different phrases or different choices of words maybe one of them likes to use the word "demarcateand one likes the word "polarize other "topicswould then be "words often used by reporter aand "words often used by reporter ,though these are not topics in the usual sense of the word let' apply lda to our movie review dataset to see how it works in practice for unsupervised text document modelsit is often good to remove very common wordsas they might otherwise dominate the analysis we'll remove words that appear in at least percent of the documentsand we'll limit the bag-of-words model to the , words that are most common after removing the top percentin[ ]vect countvectorizer(max_features= max_df vect fit_transform(text_train there is another machine learning model that is also often abbreviated ldalinear discriminant analysisa linear classification model this leads to quite some confusion in this booklda refers to latent dirichlet allocation working with text data