Skip to content

Commit

Permalink
Fixed docstrings for feature_importance
Browse files Browse the repository at this point in the history
  • Loading branch information
x-tabdeveloping committed Aug 2, 2024
1 parent 5692b73 commit 963c89f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions turftopic/models/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ class ClusteringTopicModel(ContextualModel, ClusterMixin, DynamicTopicModel):
Clustering method to use for finding topics.
Defaults to OPTICS with 25 minimum cluster size.
To imitate the behavior of BERTopic or Top2Vec you should use HDBSCAN.
feature_importance: 'soft-c-tf-idf', 'c-tf-idf' or 'centroid', default 'soft-c-tf-idf'
feature_importance: {'soft-c-tf-idf', 'c-tf-idf', 'bayes', 'centroid'}, default 'soft-c-tf-idf'
Method for estimating term importances.
'centroid' uses distances from cluster centroid similarly
to Top2Vec.
'c-tf-idf' uses BERTopic's c-tf-idf.
'soft-c-tf-idf' uses Soft c-TF-IDF from GMM, the results should
be very similar to 'c-tf-idf'.
'bayes' uses Bayes' rule.
n_reduce_to: int, default None
Number of topics to reduce topics to.
The specified reduction method will be used to merge them.
Expand Down Expand Up @@ -281,8 +282,14 @@ def estimate_components(
Parameters
----------
feature_importance: {'centroid', 'soft-c-tf-idf', 'bayes' 'c-tf-idf'}
Estimation method.
feature_importance: {'soft-c-tf-idf', 'c-tf-idf', 'bayes', 'centroid'}, default 'soft-c-tf-idf'
Method for estimating term importances.
'centroid' uses distances from cluster centroid similarly
to Top2Vec.
'c-tf-idf' uses BERTopic's c-tf-idf.
'soft-c-tf-idf' uses Soft c-TF-IDF from GMM, the results should
be very similar to 'c-tf-idf'.
'bayes' uses Bayes' rule.
Returns
-------
Expand Down

0 comments on commit 963c89f

Please sign in to comment.