-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyldavis replaced with tmplot, docs updated, type hints improved
- Loading branch information
Showing
10 changed files
with
72 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ Plotting functions | |
|
||
.. currentmodule:: bitermplus | ||
|
||
.. autofunction:: vis_prepare_model | ||
.. autofunction:: plot_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ cython | |
scipy | ||
pandas | ||
scikit-learn | ||
pyLDAvis | ||
tmplot | ||
tqdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ install_requires = | |
pandas | ||
scipy | ||
scikit-learn | ||
pyLDAvis | ||
tmplot | ||
tqdm | ||
|
||
[options.packages.find] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '0.6.6' | ||
__version__ = '0.6.7' | ||
|
||
from bitermplus._btm import BTM | ||
from bitermplus._util import * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
__all__ = ['vis_prepare_model'] | ||
from pyLDAvis import prepare as plv_prepare | ||
import numpy as np | ||
__all__ = ['plot_model'] | ||
from tmplot import report as plot_model | ||
|
||
# def vis_prepare_model( | ||
# ttd: np.ndarray, | ||
# dtd: np.ndarray, | ||
# docs_len: np.ndarray, | ||
# vocab: np.ndarray, | ||
# term_freq: np.ndarray, | ||
# **kwargs: dict): | ||
# """Simple wrapper around :meth:`pyLDAvis.prepare` method. | ||
|
||
def vis_prepare_model( | ||
ttd: np.ndarray, | ||
dtd: np.ndarray, | ||
docs_len: np.ndarray, | ||
vocab: np.ndarray, | ||
term_freq: np.ndarray, | ||
**kwargs: dict): | ||
"""Simple wrapper around :meth:`pyLDAvis.prepare` method. | ||
# Parameters | ||
# ---------- | ||
# ttd : np.ndarray | ||
# Topics vs words probabilities matrix (T x W). | ||
# dtd : np.ndarray | ||
# Document vs topics probabilities (D x T). | ||
# docs_len : np.ndarray | ||
# The length of each document, i.e. the number of words in each document. | ||
# The order of the numbers should be consistent with the ordering of the | ||
# docs in `dtd` (D x 1). | ||
# vocab : np.ndarray | ||
# List of all the words in the corpus used to train the model (W x 1). | ||
# term_freq : np.ndarray | ||
# The count of each particular term over the entire corpus (W x 1). | ||
# **kwargs : dict | ||
# Keyword arguments passed to :meth:`pyLDAvis.prepare` method. | ||
|
||
Parameters | ||
---------- | ||
ttd : np.ndarray | ||
Topics vs words probabilities matrix (T x W). | ||
dtd : np.ndarray | ||
Document vs topics probabilities (D x T). | ||
docs_len : np.ndarray | ||
The length of each document, i.e. the number of words in each document. | ||
The order of the numbers should be consistent with the ordering of the | ||
docs in `dtd` (D x 1). | ||
vocab : np.ndarray | ||
List of all the words in the corpus used to train the model (W x 1). | ||
term_freq : np.ndarray | ||
The count of each particular term over the entire corpus (W x 1). | ||
**kwargs : dict | ||
Keyword arguments passed to :meth:`pyLDAvis.prepare` method. | ||
# Returns | ||
# ------- | ||
# data : PreparedData | ||
# Output of :meth:`pyLDAvis.prepare` method. | ||
# """ | ||
|
||
Returns | ||
------- | ||
data : PreparedData | ||
Output of :meth:`pyLDAvis.prepare` method. | ||
""" | ||
|
||
vis_data = plv_prepare( | ||
ttd, dtd, docs_len, vocab, term_freq, **kwargs) | ||
return vis_data | ||
# vis_data = plv_prepare( | ||
# ttd, dtd, docs_len, vocab, term_freq, **kwargs) | ||
# return vis_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters