C# Incorect ML Time Series forecasting with big values

Vlad Mishyn 1 Reputation point

Hey there) Was making very simple stock prediction app (Simple Colege Project). For feracast i used Microsoft ML Time Series Model. It worked good but i noticed when i make predictions for data with big values like 1700 or 3800 it makes very incorrect predictions. For instance if csv file has small values like 20.21 or 10.63 it works good and predicts similar values in that or close to that range. But if csv file has columns with great values like 3700 or so it just goes crazy and splits prediction values in half. For example for values in range 3136 it made prediction 1800 or 700 depends on model parameters.

var context = new MLContext();
    var data = context.Data.LoadFromTextFile<StockData>(@"C:\Users\Vlad Mishyn\Desktop\DIPLOM1\ASIX\ASIX\bin\x64\Debug\FinalCsvFile.csv", hasHeader: true, separatorChar: ',');

    var pipeline = context.Forecasting.ForecastBySsa(
                                        windowSize: 7,
                                        seriesLength: 30,
                                        horizon: 7,
                                        confidenceLevel: 0.95f,
                                        confidenceLowerBoundColumn: "LowerBoundRentals",
                                        confidenceUpperBoundColumn: "UpperBoundRentals"

    var model = pipeline.Fit(data);

    var forecastingEngine = model.CreateTimeSeriesEngine<StockData, StockForecast>(context);

    var forecasts = forecastingEngine.Predict();

 internal class StockForecast
        public float [] Forecast { get; set; }


internal class StockData
        public DateTime Date { get; set; }

        public float Close { get; set; }

        public float Volume { get; set; }

        public float Open { get; set; }

        public float High { get; set; }

        public float Law { get; set; }


I thought maybe i chosed wrong model for prediction but i saw a lot of people were using this model for prices with more biger values. I was playing with all models parameters in order to find optimal one, but it didn't help. I am new to data prediction subject but even in Python models i've havent seen such model behavior. Just really interested in our opinion about that. This is the way csv file looks like. Unfortunatelly i am still not allowed to attach photos or files.

.NET Machine learning
.NET Machine learning
.NET: Microsoft Technologies based on the .NET software framework.Machine learning: A type of artificial intelligence focused on enabling computers to use observed data to evolve new behaviors that have not been explicitly programmed.
150 questions
0 comments No comments
{count} votes