Visualize Topic Similarity Heatmap using BERTopic
visualize_heatmap.RdThis function visualizes the topic similarity heatmap of topics from a BERTopic model using Python's Plotly library. The visualization is saved as an interactive HTML file, which can be opened and viewed in a web browser.
Arguments
- model
A BERTopic model object. The model must have the method
visualize_heatmap.- filename
A character string specifying the name of the HTML file to save the visualization. The default value is "topics_similarity_heatmap". The filename should not contain illegal characters. The
.htmlextension is added automatically if not provided.- auto_open
Logical. If TRUE, opens the HTML file after saving. Default is FALSE.