/// <summary> /// Precompute method /// </summary> public override void PreCompute() { RUtil.RegisterScript(Assembly.GetExecutingAssembly(), _baseScript); LDACorpus corpus = new LDACorpus("LDA", _source, _target); LDACorpusInfo info = corpus.Save(); _outputFile = RUtil.ReserveCacheFile("LDA.out"); _arguments = new List <object>(); _arguments.Add(info.Corpus); _arguments.Add(info.Vocab); _arguments.Add(info.Edges); _arguments.Add(_outputFile); _arguments.Add(_config.NumTopics); _arguments.Add(_config.NumIterations); _arguments.Add(_config.Alpha); _arguments.Add(_config.Eta); _arguments.Add(_config.PredictionBeta); _arguments.Add(_config.Seed); }
/// <summary> /// Constructor /// </summary> /// <param name="source">Source artifacts</param> /// <param name="target">Target artifacts</param> /// <param name="config">Configuration object</param> public RTMScript(TermDocumentMatrix source, TermDocumentMatrix target, RTMConfig config) : base() { _corpus = new LDACorpus("RTM", source, target); _config = config; }
/// <summary> /// Constructor /// </summary> /// <param name="matrix">Input matrix</param> /// <param name="sourceIDs">Source artifacts ids</param> /// <param name="targetIDs">Target artifacts ids</param> /// <param name="config">Configuration object</param> public RTMScript(TermDocumentMatrix matrix, IEnumerable<string> sourceIDs, IEnumerable<string> targetIDs, RTMConfig config) { _corpus = new LDACorpus("RTM", matrix, sourceIDs, targetIDs); _config = config; }
/// <summary> /// Constructor /// </summary> /// <param name="source">Source artifacts</param> /// <param name="target">Target artifacts</param> /// <param name="config">Configuration object</param> public RTMScript(TLArtifactsCollection source, TLArtifactsCollection target, RTMConfig config) : base() { _corpus = new LDACorpus("RTM", new TermDocumentMatrix(source), new TermDocumentMatrix(target)); _config = config; }
/// <summary> /// Precompute method /// </summary> public override void PreCompute() { RUtil.RegisterScript(Assembly.GetExecutingAssembly(), _baseScript); LDACorpus corpus = new LDACorpus("LDA", _source, _target); LDACorpusInfo info = corpus.Save(); _outputFile = RUtil.ReserveCacheFile("LDA.out"); _arguments = new List<object>(); _arguments.Add(info.Corpus); _arguments.Add(info.Vocab); _arguments.Add(info.Edges); _arguments.Add(_outputFile); _arguments.Add(_config.NumTopics); _arguments.Add(_config.NumIterations); _arguments.Add(_config.Alpha); _arguments.Add(_config.Eta); _arguments.Add(_config.PredictionBeta); _arguments.Add(_config.Seed); }
/// <summary> /// Constructor /// </summary> /// <param name="matrix">Input matrix</param> /// <param name="sourceIDs">Source artifacts ids</param> /// <param name="targetIDs">Target artifacts ids</param> /// <param name="config">Configuration object</param> public RTMScript(TermDocumentMatrix matrix, IEnumerable <string> sourceIDs, IEnumerable <string> targetIDs, RTMConfig config) { _corpus = new LDACorpus("RTM", matrix, sourceIDs, targetIDs); _config = config; }