From the course: Natural Language Processing in Python
Unlock this course with a free trial
Join today to access over 26,400 courses taught by industry experts.
Demo: Fit an NMF model - Python Tutorial
From the course: Natural Language Processing in Python
Demo: Fit an NMF model
For this demo, our goal is going to be to use non-negative matrix factorization to find the main themes in product reviews. Alright, let's start our new section here and call it Topic Modeling. Let's also restate our goal one more time so we can reference it later on. Now the first thing we need to input into our Topic Modeling model is a vectorized version of our text. So far throughout this section, we've created a count vectorizer as well as a TF-IDF vectorizer. And for NMF, TF-IDF vectorizers tend to work better because they do a better job of emphasizing important words. And we want to see those important words to come up with our topics. So that's the one I'm going to copy down here. So I'm going to take this from our text classification section, paste it down here, and I'm going to change some of these variable names so we don't overwrite our variables from earlier. Alright, let me run that. And you can see we have our document term matrix. But I'm also going to modify some of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Section introduction1m 20s
-
(Locked)
What is machine learning (ML)?2m 55s
-
(Locked)
Common ML algorithms for NLP2m 51s
-
(Locked)
Traditional NLP overview2m 31s
-
(Locked)
Traditional vs. modern NLP1m 55s
-
(Locked)
Demo: Create a new environment4m 9s
-
(Locked)
Sentiment analysis1m 28s
-
(Locked)
Sentiment analysis in Python2m 46s
-
(Locked)
Demo: Sentiment analysis in Python6m 11s
-
(Locked)
Assignment: Sentiment analysis58s
-
(Locked)
Solution: Sentiment analysis8m 50s
-
(Locked)
Text classification basics1m 51s
-
(Locked)
Text classification algorithms2m 6s
-
(Locked)
Naive Bayes8m 4s
-
(Locked)
Naive Bayes in Python3m 8s
-
(Locked)
Demo: Naive Bayes setup9m 19s
-
(Locked)
Demo: Naive Bayes workflow8m 33s
-
(Locked)
Demo: Naive Bayes prediction3m 8s
-
(Locked)
Pro tip: Compare ML models8m 56s
-
(Locked)
Text classification next steps3m 11s
-
(Locked)
Assignment: Text classification1m 25s
-
(Locked)
Solution: Text classification14m 3s
-
(Locked)
Topic modeling basics2m 16s
-
(Locked)
Topic modeling algorithms1m 42s
-
(Locked)
Non-negative matrix factorization (NMF)4m 22s
-
(Locked)
NMF in Python2m 28s
-
(Locked)
Demo: Fit an NMF model5m 1s
-
(Locked)
Pro tip: Display topics function9m 30s
-
(Locked)
Demo: Tune an NMF model8m 51s
-
(Locked)
Topic modeling next steps1m 56s
-
(Locked)
Pro tip: Combine ML algorithms5m 3s
-
(Locked)
Assignment: Topic modeling1m 45s
-
(Locked)
Solution: Topic modeling13m 5s
-
(Locked)
Key takeaways2m 57s
-
(Locked)
-
-
-
-