【问题标题】:How predict Future prices in C# .net core如何预测 C# .net 核心中的未来价格
【发布时间】:2020-04-20 09:22:04
【问题描述】:

我想根据之前的数据预测未来的价格 我想制作一个显示预测价格的门户网站。 我试过了: 时间序列

    IDataView trainingDataView = mlContext.Data.LoadFromEnumerable(modelInputs);
            // Build training pipeline
            var dataProcessPipeline = mlContext.Forecasting.ForecastBySsa(
                 "Score",
                 nameof(ModelInput.priceA),
                 windowSize: 5,
                 seriesLength: 10,
                 trainSize: modelInputs.Count(),
                 horizon: 10,
                 confidenceLowerBoundColumn: "LowerBoundScore",
                 confidenceUpperBoundColumn: "UpperBoundScore",
                 confidenceLevel:0.95f
                );

价格因因素和先前数据而异 但它不需要任何影响因素 我也试过了:

 var dataProcessPipeline = mlContext.Transforms.Categorical.OneHotEncoding(new[] { new InputOutputColumnPair("name", "name") })
                                      .Append(mlContext.Transforms.Text.FeaturizeText("Date_tf", "Date"))
                                      .Append(mlContext.Transforms.Concatenate("Features", new[] { "name", "Date_tf", "priceB" }));
            // Set the training algorithm 
            var trainer = mlContext.Regression.Trainers.FastTree(labelColumnName: "priceA", featureColumnName: "Features");

但是获取特定日期的数据没有任何意义如果将我的日期变量更改为字符串它可以工作但不工作 如果我制作我的可变数据 根据以前的数据和影响因素预测未来价格的最佳算法或技术是什么

【问题讨论】:

    标签: asp.net asp.net-core prediction ml.net


    【解决方案1】:

    您需要将日期列转换为整数。查看此示例,了解如何完成此操作:

    https://github.com/gvashishtha/time-series-mlnet/blob/master/time-series-forecast.ipynb

    【讨论】:

      猜你喜欢
      • 2021-10-24
      • 1970-01-01
      • 2018-02-17
      • 1970-01-01
      • 2018-03-07
      • 2021-07-22
      • 2018-04-07
      相关资源
      最近更新 更多