LDA++
|
#include <Document.hpp>
Public Member Functions | |
EigenCorpus (const Eigen::MatrixXi &X, int random_state=0) | |
size_t | size () const override |
virtual const std::shared_ptr< Document > | at (size_t index) const override |
void | shuffle () override |
Protected Attributes | |
CorpusIndexes | indices_ |
const Eigen::MatrixXi & | X_ |
Wrap a matrix X and implement the corpus interface.
|
overridevirtual |
The ith document
Implements ldaplusplus::corpus::Corpus.
|
overridevirtual |
Shuffle the documents so that the ith document is any of the documents with probability 1.0/size() .
Implements ldaplusplus::corpus::Corpus.
|
overridevirtual |
The number of documents in the corpus
Implements ldaplusplus::corpus::Corpus.
|
protected |
To implement shuffle
|
protected |
We keep X_ protected instead of private to reduce boilerplate in creating a supervised version of this Corpus.