Forecasting Emergency Department arrivals with Facebook Prophet library
Mäkipää, Antti-Jussi (2021)
Mäkipää, Antti-Jussi
2021
Tieto- ja sähkötekniikan kandidaattiohjelma - Bachelor's Programme in Computing and Electrical Engineering
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2021-05-25
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202105235326
https://urn.fi/URN:NBN:fi:tuni-202105235326
Tiivistelmä
Emergency departments are prone to overcrowding due to mismatch between service demand and available resources. Forecasting the number of future visitors would enable more intelligent resource allocation and ensure timely care for each individual patient. This thesis aims to predict the arrivals for the next day in the Tampere University Emergency Department Acuta using a machine learning library called Facebook Prophet. The dataset used to train and test the model contains hourly Emergency Department data over a three year period between year 2015 and 2019.
Time series forecasting is a subfield machine learning where the predictive model is trained with past data in order to predict the future. Time series model can be composed of different components and for instance, Facebook Prophet is formed with the following components: trend, seasonality, holidays and the error term. There are three different metrics used in this thesis for evaluating the model, one of them being mean absolute percentage error (MAPE).
70 % of the dataset is used to train the model and optimize the hyperparameters, while 30 % is retained as a test set. Out of sample validation is performed on the test set using rolling origin cross validation. Alongside to fitting the model, hyperparameter tuning and variable selection are implemented. Hyperparameters are built-in parameters that define the model structure and in this thesis, the variables are exogenous variables, such as weather or calendar variables. Both hyperparameter tuning and variable selection are part of the optimization of the model.
The results show that Prophet managed to forecast the future quite accurately. Even without hyperparameter tuning and variable selection the model yielded 7.24 % MAPE. Hyperparameter tuning and variable selection managed to decrease the error rate to 6.57 %.
Time series forecasting is a subfield machine learning where the predictive model is trained with past data in order to predict the future. Time series model can be composed of different components and for instance, Facebook Prophet is formed with the following components: trend, seasonality, holidays and the error term. There are three different metrics used in this thesis for evaluating the model, one of them being mean absolute percentage error (MAPE).
70 % of the dataset is used to train the model and optimize the hyperparameters, while 30 % is retained as a test set. Out of sample validation is performed on the test set using rolling origin cross validation. Alongside to fitting the model, hyperparameter tuning and variable selection are implemented. Hyperparameters are built-in parameters that define the model structure and in this thesis, the variables are exogenous variables, such as weather or calendar variables. Both hyperparameter tuning and variable selection are part of the optimization of the model.
The results show that Prophet managed to forecast the future quite accurately. Even without hyperparameter tuning and variable selection the model yielded 7.24 % MAPE. Hyperparameter tuning and variable selection managed to decrease the error rate to 6.57 %.
Kokoelmat
- Kandidaatintutkielmat [6534]