예제 #1
0
        protected virtual StreamPipeline ComposeOnPipeline(string id, DataExchange exchange, string name)
        {
            var onlinePipeline = new StreamPipeline();

            parameters = new FilterParameters();

            var trainUntil = testStartDateProvider.GetTimestampOfTestStart(id);

            onlinePipeline.Register(new onNeuralPredictionFilter(parameters, trainUntil, exchange));
            onlinePipeline.Register(new onErrorCalculationFilter(parameters));

            onlinePipeline.Register(new ResultOutputFilter(repository) { MeasurementId = id, ForecastModelId = name});

            return onlinePipeline;
        }
        public onNeuralPredictionFilter(FilterParameters parameters, DateTime trainTill, DataExchange exchange = null)
        {
            this.exchange = exchange;
            this.waitUntil = trainTill;
            this.timeSeries = new TimeSeries(0);

            settings = new ForecastSettings();
            for (int i = 0; i < 5; i++)
            {
                settings.energyLags.Add(i + 1);
            }

            model = new MultipleNeuralNetworksModel();
            this.parameters = parameters;
            parameters.Values["model"] = model;
        }
        public offPredictionFittingFilter(FilterParameters parameters, DateTime trainTill, Dictionary<string, int> time, DataExchange exchange = null)
        {
            this.exchange = exchange;
            this.time = time;
            this.waitUntil = trainTill;
            this.parameters = parameters;

            settings = new ForecastSettings();
            for (int i = 0; i < 5; i++)
            {
                settings.energyLags.Add(i + 1);
            }

            for (int i = 0; i < PACKAGE_SIZE; i++)
            {
                timeSeriesEnsemble.Add(new TimeSeries(0));
            }
        }
예제 #4
0
 public virtual void UpdateParameters(FilterParameters parameters)
 {
 }
        private int testCounter = 0; //счетчик замеров в тестовой выборке

        #endregion Fields

        #region Constructors

        public onErrorCalculationFilter(FilterParameters parameters)
        {
            this.parameters = parameters;
        }