Skip to content

Conversation

shchur
Copy link
Collaborator

@shchur shchur commented Apr 6, 2024

Issue #, if available: fixes #4050

Description of changes:

  • Clearly describe that test data must include both historic & future time series values

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@shchur shchur added the API & Doc Improvements or additions to documentation label Apr 6, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@shchur shchur changed the title Clarify docs for test data [timeseries] Clarify documentation related to test_data Apr 6, 2024
@shchur shchur requested a review from canerturkmen April 6, 2024 09:02
@yinweisu
Copy link
Contributor

yinweisu commented Apr 6, 2024

Previous CI Run Current CI Run

Copy link
Contributor

@canerturkmen canerturkmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@shchur shchur merged commit 15cf0ed into autogluon:master Apr 6, 2024
@shchur shchur deleted the clarify-eval-docs branch April 6, 2024 11:15
Copy link

github-actions bot commented Apr 6, 2024

Job PR-4054-3c7fe15 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4054/3c7fe15/index.html

@lleiou
Copy link

lleiou commented Apr 6, 2024

Thank you so much for moving so quickly to adopt my suggested changes!

Just want to follow up on the reason for requiring historical period in test_data: let's say the prediction_length of my predictor is 30 days, why can't I pass a test_data which also has 30 days of data to .leaderboard() since that is the only data I want to calculate the evaluation score on? Thanks!

@shashankumar2812
Copy link

I have the same question: why is it required that data must be at least prediction_length + 1? Why not prediction_length instead of prediction_length+1?

Thank you so much for moving so quickly to adopt my suggested changes!

Just want to follow up on the reason for requiring historical period in test_data: let's say the prediction_length of my predictor is 30 days, why can't I pass a test_data which also has 30 days of data to .leaderboard() since that is the only data I want to calculate the evaluation score on? Thanks!

@shchur
Copy link
Collaborator Author

shchur commented Apr 10, 2024

@lleiou @shashankumar2812 When we call predictor.evaluate(data), essentially, the following happens:

  1. We split data into two disjoint parts:
    • future_data (last prediction_length time steps of each time series)
    • past_data (everything before the last prediction_length steps of each time series).
  2. We call forecast = predictor.predict(past_data)
  3. We compare forecast & future data score = eval_metric(future_data, forecast).

If we only provide the last prediction_length observations of each time series to predictor.evaluate, then after the split our past_data will be empty, so the predictor won't be able to generate a forecast for the forecast horizon.

We opted for this more general design (where both past data + future data is required when calling evaluate) since it allows us to evaluate the predictor on different time series / different train-test splits. If we went for the alternative approach, where predictor.evaluate accepts just the future data, this would mean that we can only evaluate the predictor on the exact same time series used for training, using only the future values starting from the end of the train data.

@shashankumar2812
Copy link

Thanks @shchur for your answer

LennartPurucker pushed a commit to LennartPurucker/autogluon that referenced this pull request Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API & Doc Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an explanation of requirements for data input in TimeSeriesPredictor.leaderboard()
5 participants