Exemplo n.º 1
0
def compute_perplexities_vb(beta, alpha, eta, max_iter, corpusids_part1,
                            wordids_1, wordcts_1, wordids_2, wordcts_2):
    vb = per_vb.VB(beta, alpha, eta, max_iter)
    LD2 = vb.compute_perplexity(corpusids_part1[k], corpuscts_part1[k],
                                corpusids_part2[k], corpuscts_part2[k])
    return (LD2)
Exemplo n.º 2
0
def compute_perplexities_vb(beta, alpha, eta, max_iter, data_test):
    vb = per_vb.VB(beta, alpha, eta, max_iter)
    LD2 = vb.compute_perplexity(data_test)
    return (LD2)
Exemplo n.º 3
0
def compute_perplexities_vb(beta, alpha, eta, max_iter,
                            wordids_1, wordcts_1, wordids_2, wordcts_2):
    """Compute perplexities, employing Variational Bayes."""
    vb = per_vb.VB(beta, alpha, eta, max_iter)
    LD2 = vb.compute_perplexity(wordids_1, wordcts_1, wordids_2, wordcts_2)
    return(LD2)
Exemplo n.º 4
0
def compute_perplexities_vb(beta, alpha, eta, max_iter, wordids_1, wordcts_1,
                            wordids_2, wordcts_2):
    vb = per_vb.VB(beta, alpha, eta, max_iter)
    LD2 = vb.compute_perplexity(wordids_1, wordcts_1, wordids_2, wordcts_2)
    return (LD2)