Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adjidieng/DETM
/ functions
Functions
48 in github.com/adjidieng/DETM
⨍
Functions
48
◇
Types & classes
1
↓ 6 callers
Method
get_beta
Returns the topic matrix \beta of shape K x V
detm.py:173
↓ 5 callers
Function
create_bow
(doc_indices, words, n_docs, vocab_size)
scripts/data_acl.py:216
↓ 5 callers
Function
create_bow
(doc_indices, words, n_docs, vocab_size)
scripts/data_undebates.py:218
↓ 5 callers
Function
create_doc_indices
(in_docs)
scripts/data_acl.py:183
↓ 5 callers
Function
create_doc_indices
(in_docs)
scripts/data_undebates.py:185
↓ 5 callers
Function
create_list_words
(in_docs)
scripts/data_acl.py:165
↓ 5 callers
Function
create_list_words
(in_docs)
scripts/data_undebates.py:167
↓ 5 callers
Function
get_completion_ppl
Returns document completion perplexity.
main.py:334
↓ 5 callers
Method
get_kl
Returns KL( N(q_mu, q_logsigma) || N(p_mu, p_logsigma) ).
detm.py:94
↓ 5 callers
Method
reparameterize
Returns a sample from a Gaussian distribution via reparameterization.
detm.py:84
↓ 5 callers
Function
split_bow
(bow_in, n_docs)
scripts/data_acl.py:294
↓ 5 callers
Function
split_bow
(bow_in, n_docs)
scripts/data_undebates.py:295
↓ 5 callers
Function
write_lda_file
(filename, timestamps_in, time_list_in, bow_in)
scripts/data_acl.py:237
↓ 5 callers
Function
write_lda_file
(filename, timestamps_in, time_list_in, bow_in)
scripts/data_undebates.py:239
↓ 3 callers
Function
_fetch
(path, name)
data.py:10
↓ 3 callers
Function
_fetch_temporal
(path, name)
data.py:34
↓ 3 callers
Function
remove_empty
(in_docs, in_timestamps)
scripts/data_acl.py:132
↓ 3 callers
Function
remove_empty
(in_docs, in_timestamps)
scripts/data_undebates.py:134
↓ 2 callers
Function
_eta_helper
(rnn_inp)
main.py:302
↓ 2 callers
Function
get_document_frequency
(data, wi, wj=None)
utils.py:23
↓ 2 callers
Function
get_eta
(source)
main.py:315
↓ 2 callers
Function
get_theta
(eta, bows)
main.py:325
↓ 2 callers
Method
init_hidden
Initializes the first hidden state of the RNN used as inference network for \eta.
detm.py:209
↓ 2 callers
Function
visualize
Visualizes topics and embeddings and word usage evolution.
main.py:251
↓ 1 callers
Function
_diversity_helper
(beta, num_tops)
main.py:425
↓ 1 callers
Method
get_activation
(self, act)
detm.py:62
↓ 1 callers
Method
get_alpha
(self)
detm.py:107
↓ 1 callers
Function
get_batch
fetch input data by batch.
data.py:80
↓ 1 callers
Method
get_eta
(self, rnn_inp)
detm.py:127
↓ 1 callers
Method
get_nll
(self, theta, beta, bows)
detm.py:185
↓ 1 callers
Method
get_theta
Returns the topic proportions.
detm.py:158
↓ 1 callers
Function
get_topic_coherence
(beta, data, vocab)
utils.py:50
↓ 1 callers
Function
get_topic_quality
Returns topic coherence and topic diversity.
main.py:437
↓ 1 callers
Function
nearest_neighbors
(word, embeddings, vocab, num_words)
utils.py:118
↓ 1 callers
Function
remove_by_threshold
(in_docs, in_timestamps, thr)
scripts/data_acl.py:141
↓ 1 callers
Function
remove_by_threshold
(in_docs, in_timestamps, thr)
scripts/data_undebates.py:143
↓ 1 callers
Function
remove_not_printable
(in_str)
scripts/data_acl.py:30
↓ 1 callers
Function
train
Train DETM on data for one epoch.
main.py:194
Method
__init__
(self, args, embeddings)
detm.py:14
Function
_reparameterize
Applies the reparameterization trick to return samples from a given q
utils.py:13
Function
flatten_docs
(docs)
utils.py:109
Method
forward
(self, bows, normalized_bows, times, rnn_inp, num_docs)
detm.py:194
Function
get_data
(path, temporal=False)
data.py:64
Function
get_rnn_input
(tokens, counts, times, num_times, vocab_size, num_docs)
data.py:108
Function
log_gaussian
(z, mu=None, logvar=None)
utils.py:87
Function
logsumexp
(x, dim=0)
utils.py:102
Function
onehot
(data, min_length)
utils.py:115
Function
visualize
(docs, _lda_keys, topics, theta)
utils.py:133