Objects of this class allow building and maintaining a model for Random Projections (also known as Random Indexing). For theoretical background on RP, see:
Kanerva et al.: “Random indexing of text samples for Latent Semantic Analysis.”
The main methods are:
>>> rp = RpModel(corpus)
>>> print rp[some_doc]
>>> rp.save('/tmp/foo.rp_model')
Model persistency is achieved via its load/save methods.
id2word is a mapping from word ids (integers) to words (strings). It is used to determine the vocabulary size, as well as for debugging and topic printing. If not set, it will be determined from the corpus.
Initialize the random projection matrix.
Load a previously saved object from file (also see save).
Save the object to file via pickling (also see load).