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

Function supervised_topic_model

tests/conftest.py:148–157  ·  view source on GitHub ↗
(documents, document_embeddings, embedding_model, targets)

Source from the content-addressed store, hash-verified

146
147@pytest.fixture(scope="session")
148def supervised_topic_model(documents, document_embeddings, embedding_model, targets):
149 empty_dimensionality_model = BaseDimensionalityReduction()
150 clf = LogisticRegression()
151
152 model = BERTopic(
153 embedding_model=embedding_model,
154 umap_model=empty_dimensionality_model,
155 hdbscan_model=clf,
156 ).fit(documents, embeddings=document_embeddings, y=targets)
157 return model
158
159
160@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 3

BERTopicClass · 0.90
fitMethod · 0.45

Tested by

no test coverage detected