Real-world time series forecasting is challenging for a whole host of reasons not limited to problem features such as having multiple input variables, the requirement to predict multiple time steps, and the need to perform the same type of prediction for multiple physical sites.
In this post, you will discover a standardized yet complex time series forecasting problem that has these properties, but is small and sufficiently well understood that it can be used to explore and better understand methods for developing forecasting models on challenging datasets.
After reading this post, you will know:
- The competition and motivation for addressing the air-quality dataset.
- An overview of the defined prediction problem and the data challenges it covers.
- A description of the free data files that you can download and start working with immediately.
Kick-start your project with my new book Time Series Forecasting With Python, including step-by-step tutorials and the Python source code files for all examples.
Let’s get started.
EMC Data Science Global Hackathon
The dataset was used as the center of a Kaggle competition.
Specifically, a 24-hour hackathon hosted by Data Science London and Data Science Global as part of a Big Data Week event, two organizations that don’t seem to exist now, 6 years later.
The competition involved a multi-thousand-dollar cash prize, and the dataset was provided by the Cook County, Illinois local government, suggesting all locations mentioned in the dataset are in that locality.
The motivation for the challenge is to develop a better model for predicting air quality, taken from the competition description:
The EPA’s Air Quality Index is used daily by people suffering from asthma and other respiratory diseases to avoid dangerous levels of outdoor air pollutants, which can trigger attacks. According to the World Health Organisation there are now estimated to be 235 million people suffering from asthma. Globally, it is now the most common chronic disease among children, with incidence in the US doubling since 1980.
The competition description suggests that winning models could be used as the basis for a new air-quality prediction system, although it is not clear if any models were ever transitioned for this purpose.
The competition was won by a Kaggle employee, Ben Hamner, who presumably did not collect the prize given the conflict of interest. Ben described his winning approach in the blog post titled “Chucking everything into a Random Forest: Ben Hamner on Winning The Air Quality Prediction Hackathon” and provided his code on GitHub.
There is also a good discussion of solutions and related code in this forum post titled “General approaches to partitioning the models?“.
Predictive Modeling Problem
The data describes a multi-step forecasting problem given a multivariate time series across multiple sites or physical locations.
Given multiple weather measurements over time, predict a sequence of air quality measurements at specific future time intervals across multiple physical locations.
It is a challenging time series forecasting problem that has a lot of the qualities of real-world forecasting:
- Incomplete data. Not all weather and air quality measures are available for all locations.
- Missing data. Not all available measures have a complete history.
- Multivariate inputs: The model inputs for each forecast are comprised of multiple weather observations.
- Multi-step outputs: The model outputs are a discontiguous sequence of forecasted air quality measures.
- Multi-site outputs: The mode must output a multi-step forecast for multiple physical sites.
Download the Dataset Files
The dataset is available for free from the Kaggle website.
You must create an account and sign-in with Kaggle before you can get access to download the dataset.
The dataset can be downloaded from here:
Description of the Dataset Files
There are 4 files of interest that you must download separately; they are:
File: SiteLocations.csv
This file contains a list of site locations marked by unique identifiers and their precise location on Earth measured by longitude and latitude.
All coordinates appear to be relatively close in the North-Western Hemisphere, e.g. America.
Below is a sample of the file.
File: SiteLocations_with_more_sites.csv
This file has the same format as SiteLocations.csv and appears to list all of the same locations as that file with some additional locations.
As the filename suggests, it is just an updated version of the list of sites.
Below is a sample of the file.
File: TrainingData.csv
This file contains the training data for modeling.
The data is presented in an unnormalized manner. Each row of data contains one set of meteorological measurements for one hour across multiple locations as well as the targets or outcomes for each location for that hour.
The measures include:
- Time information, including the block of time, the index within the contiguous block of time, the average month, day of the week, and hour of the day.
- Wind measurements such as direction and speed.
- Temperature measurements such as minimum and maximum ambient temperature.
- Pressure measurements such as minimum and maximum barometric pressure.
The target variables are a collection of different air quality or pollution measures at different physical locations.
Not all locations have all weather measurements and not all locations are concerned with all target measures. Further, for those recorded variables, there are missing values marked as NA.
Below is a sample of the file.
File: SubmissionZerosExceptNAs.csv
This file contains a sample of the submission for the prediction problem.
Each row specifies the prediction for each target measure across all target locations for a given hour in a chunk of contiguous time.
Below is a sample of the file.
Framing the Prediction Problem
A large part of the challenge of this prediction problem is the vast number of ways that the problem can be framed for modeling.
This is challenging because it is not clear which framing may be the best for this specific modeling problem.
For example, below are some questions to provoke thought about how the problem could be framed.
- Is it better to impute or ignore missing observations?
- Is it better to feed in a time series of weather observations or only the observations for the current hour?
- Is it better to use weather observations from one or multiple source locations for a forecast?
- Is it better to have one model for each location or one mode for all locations?
- Is it better to have one model for each forecast time or one for all forecast times?
Further Reading
This section provides more resources on the topic if you are looking to go deeper.
- EMC Data Science Global Hackathon (Air Quality Prediction)
- Download Dataset
- Chucking everything into a Random Forest: Ben Hamner on Winning The Air Quality Prediction Hackathon
- Winning Code for the EMC Data Science Global Hackathon (Air Quality Prediction)
- General approaches to partitioning the models?
Summary
In this post, you discovered the Kaggle air-quality dataset that provides a standard dataset for complex time series forecasting.
Specifically, you learned:
- The competition and motivation for addressing the air-quality dataset.
- An overview of the defined prediction problem and the data challenges it covers.
- A description of the free data files that can download and start working with immediately.
Have you worked on this dataset, or do you intend to?
Share your experiences in the comments below.
No comments:
Post a Comment