dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.21k stars 5.86k forks source link

Clarify values used in the evaluation in the forecast example #28736

Open rolerik opened 2 years ago

rolerik commented 2 years ago

In the evaluation method data from the second year is transformed by the model. Previewing the predictions I see 7 values for ForecastedRentals in the results. I assumed that is because of the horizon = 7.

image

What do the values represent? Is that one week after the training data, i.e forecast starts at 2012-01-01? Or is it forecasting after the second year has been added by transforming the testdata, i.e forecast starts at 2013-01-01?

In either case it looks like the example code only looks at the first day of each prediction (ForecastedRentals[0]). Can that really be compared with actual values from the testdata, which has period 1 day rather than 7 days?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

rolerik commented 2 years ago

I modified the Evaluate method to do a prediction instead, similar to Forecast method. This seems more reasonable to me in order to compare with the actual results from year 2

Modified code: Program.cs

I don't understand why the predictions are different in this case, unless the Transform used in the example code actually moved the prediction point to 2013-01-01.

image

However, with the modified code the results from the Forecast method looks more similar to the graph in the tutorial. Except that the lower estimates are different. This makes me wonder if this was the way the graph was generated in the first place?

BikeRentals_modified

rolerik commented 2 years ago

Related to #27469