I have three distributions of topic obtained by Latent Dirichlet allocation:
- theme_1 = {cat*0.7, dog*0.2, pet*0.1},
- theme_2 = {salad*0.5, fish*0.3, chicken*0.2},
- theme_3 = {cuisine*0.4, food*0.3, tomato*0.3},
I need to calculate the coverage of each item in a document having a word count vector for example:
- d1 = {Dog: 4, Fish: 6, Cooking: 2: Tomato: 0, Chicken: 5, Meal: 2}
to result in a topic vector instead of the word count vector in this way:
- d1 = {theme_1, theme_2, theme_3}.
I was calculating this way:
- theme_1 in d1 = probability(dog in theme_1) * # Occurrences(dog in d1)
Because only "dog" occurs in the topic "theme_1" and in the document and so on.
Is it the right way to do it? Because I also understand that the coverage of topics in a document must be equal to 1.