Sha256: f35955277c5ac6a741e38a5a5cd3ad2201fd36adc6846c2e6b25c678042a157c
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
#pragma once #include "DMR.h" namespace tomoto { template<TermWeight _tw> struct DocumentGDMR : public DocumentDMR<_tw> { using BaseDocument = DocumentDMR<_tw>; using DocumentDMR<_tw>::DocumentDMR; std::vector<Float> metadataOrg, metadataNormalized; RawDoc::MiscType makeMisc(const ITopicModel* tm) const override { RawDoc::MiscType ret = DocumentDMR<_tw>::makeMisc(tm); ret["numeric_metadata"] = metadataOrg; return ret; } DECLARE_SERIALIZER_WITH_VERSION(0); DECLARE_SERIALIZER_WITH_VERSION(1); }; struct GDMRArgs : public DMRArgs { std::vector<uint64_t> degrees; Float sigma0 = 3.0; Float orderDecay = 0; }; class IGDMRModel : public IDMRModel { public: using DefaultDocType = DocumentDMR<TermWeight::one>; static IGDMRModel* create(TermWeight _weight, const GDMRArgs& args, bool scalarRng = false); virtual Float getSigma0() const = 0; virtual Float getOrderDecay() const = 0; virtual void setSigma0(Float) = 0; virtual const std::vector<uint64_t>& getFs() const = 0; virtual std::vector<Float> getLambdaByTopic(Tid tid) const = 0; virtual std::vector<Float> getTDF( const Float* metadata, const std::string& metadataCat, const std::vector<std::string>& multiMetadataCat, bool normalize ) const = 0; virtual std::vector<Float> getTDFBatch( const Float* metadata, const std::string& metadataCat, const std::vector<std::string>& multiMetadataCat, size_t stride, size_t cnt, bool normalize ) const = 0; virtual void setMdRange(const std::vector<Float>& vMin, const std::vector<Float>& vMax) = 0; virtual void getMdRange(std::vector<Float>& vMin, std::vector<Float>& vMax) const = 0; }; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tomoto-0.4.1 | vendor/tomotopy/src/TopicModel/GDMR.h |