//Import the necessary packages using Microsoft.ML; using Microsoft.ML.Data; //Create a time series model ITransformer timeSeriesModel = mlContext.Forecasting.ForecastBySsa( data, outputColumnName, windowSize: 12, seriesLength: 24, trainSize: data.Count(), horizon: 12, confidenceLevel: 0.95f, confidenceLowerBoundColumn: "LowerBound", confidenceUpperBoundColumn: "UpperBound");
//Create a time series engine ITransformer timeSeriesEngine = mlContext.Model.CreateTimeSeriesEngineIn this example, we create a time series engine using the CreateTimeSeriesEngine function provided by the Microsoft.ML library. We specify the input and output data types and the previously created time series model. We then use the engine to predict a time series based on a set of input data. Package library: Microsoft.ML.(timeSeriesModel); //Predict a time series IEnumerable predictions = timeSeriesEngine.Predict(inputData);