Skip to content

Commit 54a20b4

Browse files
Updated readme
1 parent e72e121 commit 54a20b4

1 file changed

Lines changed: 27 additions & 10 deletions

File tree

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,42 @@
1919

2020
> This package is still work in progress and scientific papers on some of the novel methods are currently undergoing peer-review. If you use this package and you encounter any problem, let us know by opening relevant issues.
2121
22-
#### New in version 0.3.0: Dynamic KeyNMF
23-
KeyNMF can now be used for dynamic topic modeling.
22+
### New in version 0.4.0
23+
24+
#### Online KeyNMF
25+
26+
You can now online fit and finetune KeyNMF as you wish!
2427

2528
```python
26-
from datetime import datetime
29+
from itertools import batched
2730
from turftopic import KeyNMF
2831

29-
corpus: list[str] = [...]
30-
timestamps = list[datetime] = [...]
32+
model = KeyNMF(10, top_n=5)
3133

32-
model = KeyNMF(10)
33-
doc_topic_matrix = model.fit_transform_dynamic(corpus, timestamps=timestamps, bins=10)
34+
corpus = ["some string", "etc", ...]
35+
for batch in batched(corpus, 200):
36+
batch = list(batch)
37+
model.partial_fit(batch)
38+
```
3439

35-
model.print_topics_over_time()
40+
#### $S^3$ Concept Compasses
3641

37-
# This needs Plotly: pip install plotly
38-
model.plot_topics_over_time()
42+
You can now produce a compass of concepts along two semantic axes using $S^3$.
43+
44+
```python
45+
from turftopic import SemanticSignalSeparation
46+
47+
model = SemanticSignalSeparation(10).fit(corpus)
48+
49+
# You will need to `pip install plotly` before this.
50+
fig = model.concept_compass(topic_x=1, topic_y=4)
51+
fig.show()
3952
```
4053

54+
<p align="center">
55+
<img src="../images/arxiv_ml_compass.png" width="60%" style="margin-left: auto;margin-right: auto;">
56+
</p>
57+
4158
## Basics [(Documentation)](https://x-tabdeveloping.github.io/turftopic/)
4259
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/x-tabdeveloping/turftopic/blob/main/examples/basic_example_20newsgroups.ipynb)
4360

0 commit comments

Comments
 (0)