Sha256: c263916b998c66a9b45bc2cc8ef791672cd965adc8c685d907a5d36e75cbc183

Contents?: true

Size: 871 Bytes

Versions: 2

Compression:

Stored size: 871 Bytes

Contents

#pragma once
#include "LDA.h"

namespace tomoto
{
	template<TermWeight _tw>
	struct DocumentLLDA : public DocumentLDA<_tw>
	{
		using BaseDocument = DocumentLDA<_tw>;
		using DocumentLDA<_tw>::DocumentLDA;
		using WeightType = typename DocumentLDA<_tw>::WeightType;
		Eigen::Matrix<int8_t, -1, 1> 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<TermWeight::one>;
		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;
	};
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tomoto-0.1.4 vendor/tomotopy/src/TopicModel/LLDA.h
tomoto-0.1.3 vendor/tomotopy/src/TopicModel/LLDA.h