| 22 | import java.util.List; |
| 23 | |
| 24 | public interface Inference { |
| 25 | /** |
| 26 | * Set up for inference. |
| 27 | * @param lda |
| 28 | */ |
| 29 | void setUp(LDA lda); |
| 30 | |
| 31 | /** |
| 32 | * Set up for inference. |
| 33 | * The configuration is read from properties class. |
| 34 | * @param lda |
| 35 | * @param properties |
| 36 | */ |
| 37 | void setUp(LDA lda, InferenceProperties properties); |
| 38 | |
| 39 | /** |
| 40 | * Run model inference. |
| 41 | */ |
| 42 | void run(); |
| 43 | |
| 44 | /** |
| 45 | * Get the value of doc-topic probability \theta_{docID, topicID}. |
| 46 | * @param docID |
| 47 | * @param topicID |
| 48 | * @return the value of doc-topic probability |
| 49 | */ |
| 50 | double getTheta(final int docID, final int topicID); |
| 51 | |
| 52 | /** |
| 53 | * Get the value of topic-vocab probability \phi_{topicID, vocabID}. |
| 54 | * @param topicID |
| 55 | * @param vocabID |
| 56 | * @return the value of topic-vocab probability |
| 57 | */ |
| 58 | double getPhi(final int topicID, final int vocabID); |
| 59 | |
| 60 | public List<Pair<String, Double>> getVocabsSortedByPhi(int topicID); |
| 61 | } |
no outgoing calls
no test coverage detected