Time Series Model for San Diego Nonfarm Employees Using Python

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a time series prediction model and document the end-to-end steps using a template. The San Diego Nonfarm Employees dataset is a time series situation where we are trying to forecast future outcomes based on past data points.

INTRODUCTION: The problem is to forecast the monthly number of nonfarm employees in San Diego, California. The dataset describes a time-series of people (in thousands) over 50 years (1970-2019), and there are 600 observations. We used the first 80% of the observations for training various models while holding back the remaining cases for validating the final model.

ANALYSIS: The baseline prediction (or persistence) for the dataset resulted in an RMSE of 10.534. After performing a grid search for the most optimal ARIMA parameters, the final ARIMA non-seasonal order was (1, 2, 1) with the seasonal order being (1, 0, 1, 12). Furthermore, the chosen model processed the validation data with an RMSE of 3.682, which was better than the baseline model as expected.

CONCLUSION: For this dataset, the chosen ARIMA model achieved a satisfactory result and should be considered for further modeling.

Dataset Used: All Employees: Total Nonfarm in San Diego-Carlsbad, CA (MSA) (SAND706NAN)

Dataset ML Model: Time series forecast with numerical attributes

Dataset Reference: https://fred.stlouisfed.org/series/SAND706NAN

The HTML formatted report can be found here on GitHub.