tmplot 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tmplot-0.1.1/src/tmplot.egg-info → tmplot-0.1.2}/PKG-INFO +3 -3
- {tmplot-0.1.1 → tmplot-0.1.2}/README.md +2 -1
- {tmplot-0.1.1 → tmplot-0.1.2}/pyproject.toml +1 -1
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/__init__.py +1 -1
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_helpers.py +6 -4
- {tmplot-0.1.1 → tmplot-0.1.2/src/tmplot.egg-info}/PKG-INFO +3 -3
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot.egg-info/requires.txt +0 -1
- {tmplot-0.1.1 → tmplot-0.1.2}/LICENSE +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/MANIFEST.in +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/setup.cfg +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_distance.py +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_metrics.py +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_report.py +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_stability.py +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot/_vis.py +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot.egg-info/SOURCES.txt +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot.egg-info/dependency_links.txt +0 -0
- {tmplot-0.1.1 → tmplot-0.1.2}/src/tmplot.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tmplot
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Visualization of Topic Modeling Results
|
|
5
5
|
Author-email: Maksim Terpilovskii <maximtrp@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -50,7 +50,6 @@ Requires-Dist: ipywidgets
|
|
|
50
50
|
Requires-Dist: tqdm
|
|
51
51
|
Provides-Extra: test
|
|
52
52
|
Requires-Dist: pytest; extra == "test"
|
|
53
|
-
Requires-Dist: codecov; extra == "test"
|
|
54
53
|
Requires-Dist: coverage; extra == "test"
|
|
55
54
|
Provides-Extra: models
|
|
56
55
|
Requires-Dist: tomotopy>=0.8.0; extra == "models"
|
|
@@ -59,7 +58,8 @@ Requires-Dist: bitermplus; extra == "models"
|
|
|
59
58
|
|
|
60
59
|
# tmplot
|
|
61
60
|
|
|
62
|
-
[](https://app.codacy.com/gh/maximtrp/tmplot/coverage)
|
|
62
|
+
[](https://app.codacy.com/gh/maximtrp/tmplot)
|
|
63
63
|
[](https://github.com/maximtrp/tmplot/actions/workflows/python-package.yml)
|
|
64
64
|
[](https://tmplot.readthedocs.io/en/latest/?badge=latest)
|
|
65
65
|
[](https://pepy.tech/project/tmplot)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# tmplot
|
|
2
2
|
|
|
3
|
-
[](https://app.codacy.com/gh/maximtrp/tmplot/coverage)
|
|
4
|
+
[](https://app.codacy.com/gh/maximtrp/tmplot)
|
|
4
5
|
[](https://github.com/maximtrp/tmplot/actions/workflows/python-package.yml)
|
|
5
6
|
[](https://tmplot.readthedocs.io/en/latest/?badge=latest)
|
|
6
7
|
[](https://pepy.tech/project/tmplot)
|
|
@@ -10,6 +10,7 @@ from typing import Union, Optional, Sequence, List
|
|
|
10
10
|
from functools import partial
|
|
11
11
|
from math import log
|
|
12
12
|
from numpy import ndarray, zeros, argsort, array, arange, vstack
|
|
13
|
+
from numpy import log as nplog
|
|
13
14
|
from pandas import concat, Series, DataFrame
|
|
14
15
|
|
|
15
16
|
tomotopy_installed = find_spec('tomotopy')
|
|
@@ -367,7 +368,7 @@ def calc_terms_probs_ratio(
|
|
|
367
368
|
pandas.DataFrame
|
|
368
369
|
Words conditional and marginal probabilities.
|
|
369
370
|
"""
|
|
370
|
-
p_cond_name = 'Conditional term probability, p(w|t)'
|
|
371
|
+
p_cond_name = 'Conditional term probability, p(w | t)'
|
|
371
372
|
p_cond = phi.iloc[:, topic]\
|
|
372
373
|
.rename(p_cond_name)\
|
|
373
374
|
if isinstance(phi, DataFrame)\
|
|
@@ -424,7 +425,8 @@ def get_relevant_terms(
|
|
|
424
425
|
phi_topic = phi.iloc[:, topic]\
|
|
425
426
|
if isinstance(phi, DataFrame)\
|
|
426
427
|
else phi[:, topic]
|
|
427
|
-
|
|
428
|
-
relevance =
|
|
429
|
-
|
|
428
|
+
|
|
429
|
+
# relevance = lambda * log(p(w | t)) + (1 - lambda) * log(p(w | t) / p(w))
|
|
430
|
+
relevance = lambda_ * nplog(phi_topic)\
|
|
431
|
+
+ (1 - lambda_) * nplog(phi_topic / phi.sum(axis=1))
|
|
430
432
|
return relevance.sort_values(ascending=False)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tmplot
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Visualization of Topic Modeling Results
|
|
5
5
|
Author-email: Maksim Terpilovskii <maximtrp@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -50,7 +50,6 @@ Requires-Dist: ipywidgets
|
|
|
50
50
|
Requires-Dist: tqdm
|
|
51
51
|
Provides-Extra: test
|
|
52
52
|
Requires-Dist: pytest; extra == "test"
|
|
53
|
-
Requires-Dist: codecov; extra == "test"
|
|
54
53
|
Requires-Dist: coverage; extra == "test"
|
|
55
54
|
Provides-Extra: models
|
|
56
55
|
Requires-Dist: tomotopy>=0.8.0; extra == "models"
|
|
@@ -59,7 +58,8 @@ Requires-Dist: bitermplus; extra == "models"
|
|
|
59
58
|
|
|
60
59
|
# tmplot
|
|
61
60
|
|
|
62
|
-
[](https://app.codacy.com/gh/maximtrp/tmplot/coverage)
|
|
62
|
+
[](https://app.codacy.com/gh/maximtrp/tmplot)
|
|
63
63
|
[](https://github.com/maximtrp/tmplot/actions/workflows/python-package.yml)
|
|
64
64
|
[](https://tmplot.readthedocs.io/en/latest/?badge=latest)
|
|
65
65
|
[](https://pepy.tech/project/tmplot)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|