Compute the PLSA decomposition. More...
#include <PlsaMap.h>
Public Member Functions | |
PlsaMap (int documents, int words, int topics) | |
Initialise the class with the known document, word and topic counts. | |
void | printEigenValues (void) |
Print the topic probabilities to the screen. | |
void | deleteTempBuffers (void) |
Clean up by deleting the temporary storage. | |
void | initialise (WordSubIndex *index) |
Gather statistics of the SubIndex. | |
void | zeroTempBuffers (void) |
Initialise the temporary storage. | |
void | randomiseRealBuffers (WordSubIndex *index) |
Randomise the probability storage. | |
void | initialiseRealBuffers (WordSubIndex *index) |
Alternative to random initialisation. | |
void | iterate (void) |
Perform one iteration of PLSA using the virtual functions. | |
void | iterate (int **index) |
Perform one iteration of PLSA using the provided matrix. | |
void | finalise (void) |
Finish iterations. | |
void | printFile (void) |
Write the probabilities to "compare.bin". | |
void | checkProbabilities (void) |
Check that the probabilities add to 1. | |
void | operator+= (PlsaMap *x) |
Add the results from another PlsaMap. | |
virtual void | nextElement (void)=0 |
Move to the next element in the matrix. | |
virtual void | reset (void)=0 |
Mov to the beginning of the matrix. | |
virtual int | term (void)=0 |
Return the current term. | |
virtual int | document (void)=0 |
Return the current document. | |
virtual float | frequency (void)=0 |
Return the current matrix value. | |
Public Attributes | |
float ** | Pwz |
The probability of a word given a topic. | |
float ** | Pdz |
The probability of a document given a topic. | |
float * | Pz |
The probability of a topic. | |
float | _R |
The number of words in the corpus (used to compute probabilities). | |
const int | topics |
The number of topics. |
Compute the PLSA decomposition.
This class provides the methods compute the Probabilisitic Latent Semantic Analysis from the provided document index. The data is accessed through the virtual functions provided.