#pragma once #include "LDA.h" namespace tomoto { template struct DocumentLLDA : public DocumentLDA<_tw> { using BaseDocument = DocumentLDA<_tw>; using DocumentLDA<_tw>::DocumentLDA; using WeightType = typename DocumentLDA<_tw>::WeightType; Eigen::Matrix labelMask; DEFINE_SERIALIZER_AFTER_BASE_WITH_VERSION(BaseDocument, 0, labelMask); DEFINE_TAGGED_SERIALIZER_AFTER_BASE_WITH_VERSION(BaseDocument, 1, 0x00010001, labelMask); }; class ILLDAModel : public ILDAModel { public: using DefaultDocType = DocumentLLDA; static ILLDAModel* create(TermWeight _weight, size_t _K = 1, Float alpha = 0.1, Float eta = 0.01, size_t seed = std::random_device{}(), bool scalarRng = false); virtual const Dictionary& getTopicLabelDict() const = 0; virtual size_t getNumTopicsPerLabel() const = 0; }; }