Skip to content

compute_pz_b #23

@markoarnauto

Description

@markoarnauto

First of all, thanks for providing such a great library! The code really helps to understand the paper.
But I am still wondering why the topic probability distribution P(z|B) for the oBTM seems different from the paper?

The paper states that:
bildschirmfoto 2018-12-03 um 14 20 41

But the actual calculation goes:

pw1k = (nwz[k][w1] + beta[k][w1]) / (2 * nb_z[k] + beta_sum[k]);
pw2k = (nwz[k][w2] + beta[k][w2]) / (2 * nb_z[k] + 1 + beta_sum[k]);
pz[k] = (nb_z[k] + alpha[k]) * pw1k * pw2k;

What did I miss?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions