Save a BERTopic Model Bundle
save_bertopic_model.RdPersist a trained BERTopic model to disk and store R-side extras in a companion RDS file. This is the recommended way to reuse a model across sessions when working through reticulate.
Arguments
- topic_model
A list returned by
train_bertopic_model(). Must contain a Python BERTopic model attopic_model$model. Optional extras such as probabilities, reduced embeddings, topics over time, or topics per class are saved when present and set toNULLotherwise.- path
Directory path to write the Python model to. The RDS companion file is saved as
paste0(path, "_extras.rds").