示例#1
0
        /// <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);
        }
示例#2
0
 /// <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;
 }
示例#3
0
 /// <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;
 }
示例#4
0
 /// <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;
 }
示例#5
0
 /// <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);
 }
示例#6
0
 /// <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;
 }
示例#7
0
 /// <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;
 }
示例#8
0
 /// <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;
 }