Пример #1
0
        public void AverageTopicsOverDaysDistribution(int topicNumber)
        {
            var fluTopicDistrib = topicsStatistics.AverageTopicProbabilityDistributionInDays(topicNumber, Program.TopicsFileName);
            var fileToSave = Program.StatisticsDirectory + "Topic_distributions/" + topicNumber + "_sm";
            File.WriteAllText(fileToSave + ".txt", String.Join("\n", fluTopicDistrib.Select(t => t.Key + "\t" + t.Value)));

            var sortedDistrib1 =
                new SortedDictionary<DateTime, double>(fluTopicDistrib.ToDictionary(f => DateTime.Parse(f.Key), f => f.Value));
            var sortedDistrib = sortedDistrib1.SumUpToWeeks();

            new OctavePlot(sortedDistrib.Keys.ToArray(), sortedDistrib.Values.ToArray())
            {
                Title = "Распределение топика " + topicNumber + " по дням"
            }.DrawPlotTo(fileToSave + ".png");
        }