Repository navigation
Can a dynamic topic model be saved too? #931
|
Hi folks, I want to save a GPU-trained model and load it on a CPU-workstation for visualization. The normal models works just fine but I want to export a Dynamic Topic Model too. If I call visualize_topics_over_time() on the CPU workstation, I need to recompute the topics_over_time() model but this takes an awful amount of time on a CPU. Is there a way to save this DTM model like the normal model? |
Replies: 1 comment 1 reply
|
When you run topics_over_time = topic_model.topics_over_time(tweets, timestamps, nr_bins=20)The information with respect to the dynamic nature of topics is contained in the DataFrame |
When you run
.topics_over_timethe model is not internally saving information with respect to the dynamic topic model but returns all information you need as a dataframe. In other words, when you run the following:The information with respect to the dynamic nature of topics is contained in the DataFrame
topics_over_time. This means that you would only need to savetopics_over_timeas a csv locally and pass it later on to.visualize_topics_over_time.