Creating and Assigning the Topic Model
Explore how to build and assign topic models using PyCaret's create_model and assign_model functions. Learn to visualize topics with intertopic distance maps to interpret natural language data effectively.
We'll cover the following...
We'll cover the following...
Creating the topic model
The create_model() function can be used to easily train a topic model on the preprocessed dataset. In this case, we train a LDA model with five topics, one for each of the dataset classes. After doing that, we use the assign_model() function that assigns the topic proportions to the dataset, as well as the dominant topic. Finally, we create a new dataset containing the topic proportions as well as the news article class, ...