MCPcopy
hub / github.com/MaartenGr/BERTopic / base_topic_model

Function base_topic_model

tests/conftest.py:50–55  ·  view source on GitHub ↗
(documents, document_embeddings, embedding_model)

Source from the content-addressed store, hash-verified

48
49@pytest.fixture(scope="session")
50def base_topic_model(documents, document_embeddings, embedding_model):
51 model = BERTopic(embedding_model=embedding_model, calculate_probabilities=True)
52 model.umap_model.random_state = 42
53 model.hdbscan_model.min_cluster_size = 3
54 model.fit(documents, document_embeddings)
55 return model
56
57
58@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 2

fitMethod · 0.95
BERTopicClass · 0.90

Tested by

no test coverage detected