demand forecasting for platelet usage: from univariate

25
Demand Forecasting for Platelet Usage: from Univariate Time Series to Multivariate Models Maryam Motamedi a,* , Na Li a,b , Douglas G. Down a and Nancy M. Heddle b,c a Department of Computing and Software, McMaster University, Hamilton, Ontario L8S 4L8, Canada b McMaster Centre for Transfusion Research, Department of Medicine, McMaster University, Hamilton, Ontario L8S 4L8, Canada c Centre for Innovation, Canadian Blood Services, Ottawa, Ontario K1G 4J5, Canada E-mail: [email protected] [Motamedi]; [email protected] [Li]; [email protected] [Down]; [email protected] [Heddle] Abstract Platelet products are both expensive and have very short shelf lives. As usage rates for platelets are highly variable, the effective management of platelet demand and supply is very important yet challenging. The primary goal of this paper is to present an efficient forecasting model for platelet demand at Canadian Blood Services (CBS). To accomplish this goal, four different demand forecasting methods, ARIMA (Auto Regressive Moving Average), Prophet, lasso regression (least absolute shrinkage and selection operator) and LSTM (Long Short-Term Memory) networks are utilized and evaluated. We use a large clinical dataset for a centralized blood distribution centre for four hospitals in Hamilton, Ontario, spanning from 2010 to 2018 and consisting of daily platelet transfusions along with information such as the product specifications, the recipients’ characteristics, and the recipients’ laboratory test results. This study is the first to utilize different methods from statistical time series models to data-driven regression and a machine learning technique for platelet transfusion using clinical predictors and with different amounts of data. We find that the multivariate approaches have the highest accuracy in general, however, if suffi- cient data are available, a simpler time series approach such as ARIMA appears to be sufficient. We also comment on the approach to choose clinical indicators (inputs) for the multivariate models. Keywords: demand forecasting; time series forecasting; platelet products; blood demand and supply chain; long short-term memory networks * Author to whom all correspondence should be addressed (e-mail: [email protected]). 1 arXiv:2101.02305v1 [cs.LG] 6 Jan 2021

Upload: others

Post on 05-Oct-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Demand Forecasting for Platelet Usage: from Univariate

Demand Forecasting for Platelet Usage: from Univariate TimeSeries to Multivariate Models

Maryam Motamedia,∗, Na Lia,b, Douglas G. Downa and Nancy M. Heddleb,c

a Department of Computing and Software, McMaster University, Hamilton, Ontario L8S 4L8, CanadabMcMaster Centre for Transfusion Research, Department of Medicine, McMaster University, Hamilton, Ontario L8S 4L8,

CanadacCentre for Innovation, Canadian Blood Services, Ottawa, Ontario K1G 4J5, Canada

E-mail: [email protected] [Motamedi]; [email protected] [Li];[email protected] [Down]; [email protected] [Heddle]

Abstract

Platelet products are both expensive and have very short shelf lives. As usage rates for platelets are highly variable,the effective management of platelet demand and supply is very important yet challenging. The primary goal ofthis paper is to present an efficient forecasting model for platelet demand at Canadian Blood Services (CBS). Toaccomplish this goal, four different demand forecasting methods, ARIMA (Auto Regressive Moving Average),Prophet, lasso regression (least absolute shrinkage and selection operator) and LSTM (Long Short-Term Memory)networks are utilized and evaluated. We use a large clinical dataset for a centralized blood distribution centre forfour hospitals in Hamilton, Ontario, spanning from 2010 to 2018 and consisting of daily platelet transfusions alongwith information such as the product specifications, the recipients’ characteristics, and the recipients’ laboratorytest results. This study is the first to utilize different methods from statistical time series models to data-drivenregression and a machine learning technique for platelet transfusion using clinical predictors and with differentamounts of data. We find that the multivariate approaches have the highest accuracy in general, however, if suffi-cient data are available, a simpler time series approach such as ARIMA appears to be sufficient. We also commenton the approach to choose clinical indicators (inputs) for the multivariate models.

Keywords: demand forecasting; time series forecasting; platelet products; blood demand and supply chain; long short-termmemory networks

∗Author to whom all correspondence should be addressed (e-mail: [email protected]).

1

arX

iv:2

101.

0230

5v1

[cs

.LG

] 6

Jan

202

1

Page 2: Demand Forecasting for Platelet Usage: from Univariate

1. Introduction

Platelet products are a vital component of patient treatment for bleeding problems, cancer, AIDS, hep-atitis, kidney or liver diseases, traumatology and in surgeries such as cardiovascular surgery and organtransplants (Kumar et al., 2015). In addition, miscellaneous platelet usage and supply are associated withseveral factors such as patients with severe bleeding, trauma patients, aging population and emergenceof a pandemic like COVID-19 (Stanworth et al., 2020). The first two factors affect the uncertain demandpattern, while the latter two factors result in donor reduction. Platelet products have five to seven daysshelf life before considering test and screening processes that typically last two days (Fontaine et al.,2009). The extremely short shelf life along with the highly variable daily platelet usage makes plateletdemand and supply management a highly challenging task, invoking a robust blood product demand andsupply system.

To deal with high demand variation, hospitals usually hold excess inventory. However, holding surplusinventory makes platelet demand forecasting even more challenging for blood distribution centres. Inparticular, holding excessive platelet inventory in hospital blood banks not only results in a high wastagerate, but also prevents the blood suppliers from realizing the real underlying platelet demand. which inturn yields an inefficient demand forecasting system. This can result in the bullwhip effect, the increasedvariation in demand as a result of moving upstream in the supply chain (Croson and Donohue, 2006).This effect arises in a number of domains, including grocery supply chains (Dejonckheere et al., 2004) aswell as in healthcare service-oriented supply chains (Samuel et al., 2010; Rutherford et al., 2016). Thebullwhip effect is inevitable in a healthcare system, since for the blood products, specifically plateletproducts with extremely short shelf lives, hospitals tend to order more than their regular demand toensure that they can meet the actual demand, as shortages must be avoided (they can put patients atrisk). Apart from this bullwhip effect, there are many uncertainties faced by blood centres due to thehigh demand variation. Since platelet products are perishable, high inventory levels result in excessivewastage, something that could be mitigated with better demand forecasting. On the other hand, lowinventory levels increase the risk of shortages resulting in urgent delivery costs. Accordingly, accuratelyforecasting the demand for blood products is a core requirement of a robust blood demand and supplymanagement system.

Two organizations, CBS and Hema-Quebec, are responsible for providing blood products and ser-vices in transfusion and transplantation for Canadian patients. The former operates within all Canadianprovinces and territories excluding Quebec, while the latter is in charge of the province of Quebec. Thecurrent blood supply chain for CBS is an integrated network consisting of a regional CBS distributioncentre and several hospitals, as illustrated in Fig. 1. Currently, there are nine regional blood centres oper-ating for CBS, each covering the demand for several hospitals (Hospital Liaison Specialists, [AccessedDate: 2020-11-01). Hospitals request blood products from the regional blood centres for the next day,yet, the regional blood centres are not aware of the actual demands as each hospital has its own bloodbank. Furthermore, recipients’ demographic and hospitals’ inventory management systems are not dis-closed to CBS or the regional blood centres. This results in a high wastage rate for the hospitals (about6% in Hamilton, Ontario) and CBS (about 15% and has seasonal variation), which may be partly due tothe bullwhip effect.

This research is motivated by the platelet management problem confronted by CBS. There are severalissues faced by CBS, making the platelet management problem difficult. As mentioned above, CBS cur-

Page 3: Demand Forecasting for Platelet Usage: from Univariate

Fig. 1: CBS blood supply chain with one regional blood centre and multiple hospitals

rently does not have access to transfused patients’ demographics. Also, owing to the lack of informationtransmission between CBS and hospitals, the effect of clinical changes on platelet demand cannot betracked by CBS. The need for robust and accurate platelet demand forecasting calls for transparency ofinformation between CBS and hospitals. In this research, we forecast platelet demand to overcome thesechallenges.

We study a large clinical database with 61377 platelet transfusions for 47496 patients in hospitalsin Hamilton, Ontario from 2010 to 2018. We analyse the database to extract trends and patterns, andfind relations between the demand and clinical indicators. We find that there are three key issues thatshould be considered in the demand forecasting process: seasonality, the effect of clinical indicatorson demand, and nonlinear correlations among these clinical indicators. Consequently, we progressivelybuild four demand forecasting models (of increasing complexity) that address these issues. The proposedmethods are applied on the data to determine the influence of demand history as well as clinical indicatorson demand forecasting. The first two methods are univariate time series that only consider the demandhistory, while the remaining two methods, multivariate regression and machine learning, consider clinicalindicators. These four methods are utilized to pursue the following goals: i) more precise platelet demandforecasting resulting in increased information transparency between CBS and hospitals, ii) reducing thebullwhip effect, as a consequence of effective demand forecasting; iii) investigating the impact of clinicalindicators on the platelet demand; and iv) having a robust forecasting model for platelet demand whichaccounts for variation in multiple factors. The main contributions of this study are as follows:

1. We analyze the time series of platelet transfusion data by decomposing it into trend, seasonality andresiduals, and detect meaningful patterns such as weekday/weekend and holiday effects that shouldbe considered in any platelet demand predictor.

2. We utilize four different demand forecasting methods from univariate time series methods to multi-variate methods including regression and machine learning. Since CBS has no access to recipients’demographic data, our first method, ARIMA, only considers demand history for forecasting, while the

Page 4: Demand Forecasting for Platelet Usage: from Univariate

second model, Prophet, includes seasonalities, trend changes and holiday effects. We found that thesemodels have issues with respect to accuracy, in particular when a limited amount of data are available,accordingly we apply a lasso regression method to include clinical indicators for demand forecast-ing. Finally, LSTM networks are used for demand forecasting to explore the nonlinear dependenciesamong the clinical indicators and the demand.

3. We utilize clinical indicators in the demand forecasting process, and select those that are most impact-ful through a structural variable selection and regularization method called lasso regression. Resultsshow that incorporating the clinical indicators in demand forecasting enhances the forecasting accu-racy.

4. We investigate the effect of different amounts of data on the forecasting accuracy and model perfor-mance and provide a holistic evaluation and comparison for different forecasting methods to evalu-ate the effectiveness of these models for different data types, providing suggestions on using theserobust demand forecasting strategies in different circumstances. Results show that by having a lim-ited amount of data (two years in our case), multivariate models outperform the univariate models,whereas having a large amount of data (eight years in our case) results in the ARIMA model perform-ing nearly as well as the multivariate methods.

The rest of this paper is organized as follows. Section 2 provides an initial exploration of the data. InSection 3 we provide a literature review of demand forecasting methods for blood products, with a focuson platelets. We provide the data description, model background, model development and evaluation offour different models for platelet demand forecasting in Section 4. In Section 5, a comparison of themodels is provided, and finally, in Section 6, concluding remarks are provided, including a discussion ofongoing work for this problem.

2. Problem Definition

In this study, we consider a blood supply system consisting of CBS and four major hospitals operatingin Hamilton, namely, Hamilton General Hospital, Juravinski Hospital, McMaster University MedicalCentre (MUMC), and St. Joseph’s (STJ) Healthcare Hamilton. These hospital blood banks operate witha Transfusion Medicine (TM) laboratory team to manage blood product transfusions to patients. Plateletproducts are collected and produced at CBS and after testing for viruses and bacteria (a process whichlasts two days), platelets are ready to be shipped to hospitals and transfused to patients. At the beginningof the day, hospitals receive platelet products that were ordered on the previous day, from CBS. In thecase of shortages, hospitals can place expedited (same-day) orders at a higher cost. Prior to September2017, platelets had five days of shelf life, while after this date, the shelf life of platelets was increasedto seven days. After passing the shelf life, platelet products are expired and discarded. Given the highshortage and wastage costs, forecasting short-term demand for platelets is of particular value.

In order to propose a short-term demand forecasting model for CBS, we first explore the data foridentifying temporal (daily/monthly) patterns that can inform our demand forecasting techniques. Thisinitial analysis ranges from 2010/01/01 to 2018/12/31. An initial observation is that the demand is highlyvariable, with a transfused daily average of 17.90 units and a standard deviation of 7.05 units.

In terms of specific temporal patterns, we first looked into the daily platelet usage patterns by year,month and day. There are no specific yearly patterns for platelet transfusions. Fig. 2(a) illustrates the

Page 5: Demand Forecasting for Platelet Usage: from Univariate

January February March April May June July August September October November December

Month

0

10

20

30

40

50

Daily

Units

Transfused

(a) Month

Monday Tuesday Wednesday Thursday Friday Saturday SundayDay of the week

0

10

20

30

40

50

Dai

ly U

nits

Tra

nsfu

sed

(b) Weekday

Fig. 2: Boxplots for mean daily units transfused in week, month and year

daily platelet usage pattern by month. It indicates that the platelet usage varies by month, the lowestnumber of transfusions is in January while the highest number of transfusions is in July (January = mean[sd(standard deviation)]: 17.35 [6.43], July = mean [sd]: 20.38 [8.03]). It is worth noticing that in July,the number of outliers (points outside of the whiskers in the boxplot) is also higher in comparison toother months. Outliers are defined as points with values greater than the third quartile plus 1.5 times theinterquartile range or less than the first quartile minus 1.5 times the interquartile range. As we can seefrom Fig. 2(a), there is significant monthly seasonality (one-way ANOVA, F = 3.94, P value <0.001).

The mean daily platelet usage by day of the week is plotted in Fig. 2(b). As we can see, there is asignificant difference in the mean daily platelet usage when comparing weekdays to weekends (weekday= mean [sd]: 21.20 [6.22], weekend = mean [sd]: 12.37 [4.60], Mann-Whitney U test: P value = 0.04).The P value is considered as statistically significant (as it is less than 0.05). One reason for the lowerplatelet usage on weekends is that prophylactic platelet transfusions to cancer patients on Fridays ensurethat platelet counts remain sufficiently high over the weekend. This pattern of practice (prophylactic use)does not tend to occur in other patient populations (trauma, surgery, etc.) since these patients get plateletsas a direct consequence of bleeding. Furthermore, during the weekdays, Tuesday has the highest numberof transfusions (mean [sd]: 21.68 [6.10]), while Monday has the lowest number of transfusions (mean[sd]: 20.04 [6.53]). Consequently, there is a clear weekday/weekend effect. This reflects that day of theweek should be considered in any daily demand estimator.

Fig. 3 compares the mean daily units transfused and the mean daily units received from January 1,2010 to December 31, 2018. Reviewing the figures, it can be concluded that generally, the range of thedaily units received is greater than the range of total transfused units in a given, day, month, or year whichsuggests higher variability for the total number of received units (standard deviation of 9.33) comparedto transfused units (standard deviation of 7.04). Indeed, this has its roots in the bullwhip effect, that ishospitals tend to order more than their actual demand. We see an opportunity to better coordinate supply(number of units received) with demand (number of units transfused) through the development of a daily

Page 6: Demand Forecasting for Platelet Usage: from Univariate

demand predictor.

2010 2011 2012 2013 2014 2015 2016 2017 2018Year

0

10

20

30

40

50

60

Daily

Unit

s

TransfusedReceived

(a) Mean daily units transfused vs. mean daily units received (year)

January February March April May June July August September October November DecemberMonth

0

10

20

30

40

50

60

Da

ily U

nits

TransfusedReceived

(b) Mean daily units transfused vs. mean daily units received (month)

Monday Tuesday Wednesday Thursday Friday Saturday SundayDay of the week

0

10

20

30

40

50

60

Daily

Units

TransfusedReceived

(c) Mean daily units transfused vs. mean daily units received (day-of-the-week)

Fig. 3: Mean daily units transfused vs. mean daily units received

Fig. 3(a) shows that the number of received units is more than the transfused units over the years.However, there does not appear to be any pattern between the number of received and transfused units,suggesting that there is no yearly impact on platelet demand. Fig. 3(b) indicates that there is a near-uniform pattern for the number of received and transfused units by month. Finally, in Fig. 3(c), it canbe noted that on Mondays the number of received units tends to be significantly larger than for theweekend. It is also noticeable that on weekends the number of received and transfused units clearlydiffer from the weekdays due to lower staffing levels over the weekends. On Saturday, on average, thenumber of transfused units is lower than the number of received units, but on Sunday, the total number ofreceived units drops considerably, resulting in a large gap between the number of received and transfusedunits. This appears to be compensated for by the total number of received units on Monday. This is anadditional effect that could be mitigated by better coordination between supply and demand.

We additionally explored applying the Seasonal and Trend decomposition using Loess (STL) modelto decompose the time series data into trend, seasonality, and residuals. Fig. 4 depicts the time seriesdecomposition ranging from 2010 to 2018. As we can see from Fig. 4, there is an upward trend for data

Page 7: Demand Forecasting for Platelet Usage: from Univariate

in this period, and it becomes stationary from 2016 onwards. As a result, we will train our models in twoscenarios, one with the whole dataset and the other by using the data ranging from 2016 to 2018.

1015

2025

3035

data

−4−2

02

4

season

al16

1718

19

trend

−50

510

15

2010 2012 2014 2016 2018

residu

al

time

Fig. 4: Time series decomposition using STL method

3. Literature Review

There is a limited literature on platelet demand forecasting; most investigates univariate time series meth-ods. In these studies, forecasts are based solely on previous demand values, without considering otherfeatures that may affect the demand. Frankfurter et al. (1974) develop transfusion forecasting modelsusing Exponential Smoothing (ES) methods for a blood collection and distribution centre in New York.Critchfield et al. (1985) develop models for forecasting platelet usage in a blood centre using severaltime series methods including Moving Average (MA), Winter’s method and ES. Silva Filho et al. (2012)develop a Box-Jenkins Seasonal Autoregressive Integrated Moving Average (BJ-SARIMA) model toforecast weekly demand for blood components in hospitals. Their proposed method, SARIMA, is basedon a Box-Jenkins approach that takes into consideration the seasonal and nonseasonal characteristics oftime series data. Later, Silva Filho et al. (2013) extend their model by developing an automatic procedurefor demand forecasting while also changing the level of the model from hospital level to regional bloodcentre in order to help managers use the model directly. Kumari and Wijayanayake (2016) propose ablood inventory management model for the daily supply of platelets focusing on reducing platelet short-ages. Three time series methods, namely MA, Weighted Moving Average (WMA) and ES are used toforecast the demand, and are evaluated based on shortages. Fortsch and Khapalova (2016) test variousapproaches to predict blood demand such as Naıve, moving average, exponential smoothing, and mul-tiplicative Time Series Decomposition (TSD), among them a Box-Jenkins (ARMA) approach, whichuses an autoregressive moving average model, results in the highest prediction accuracy. They forecasttotal blood demand as well as individual blood type demands, a feature that differentiates their method.Lestari et al. (2017) apply four models to forecast blood components demand including moving average,weighted moving average, exponential smoothing, exponential smoothing with trend, and select the best

Page 8: Demand Forecasting for Platelet Usage: from Univariate

method for their data based on the minimum error between forecasts and the actual values. Volken et al.(2018) use generalized additive regression and time-series models with exponential smoothing to predictfuture whole blood donation and RBC transfusion trends.

Several recent studies take clinically-related indicators into consideration. Drackley et al. (2012) esti-mate long-term blood demand for Ontario, Canada based on previous transfusions’ age and sex-specificpatterns. They forecast blood supply and demand for Ontario by considering demand and supply pat-terns, and demographic forecasts, with the assumption of fixed patterns and rates over time. Khaldi et al.(2017) apply Artificial Neural Networks (ANNs) to forecast the monthly demand for three blood com-ponents, red blood cells (RBCs), platelets and plasma for a case study in Morocco. Guan et al. (2017)propose an optimization ordering strategy in which they forecast the platelet demand for several daysinto the future and build an optimal ordering policy based on the predicted demand, concentrating onminimizing the wastage. Their main focus is on an optimal ordering policy and they integrate their de-mand model in the inventory management problem, meaning that they do not try to precisely forecast theplatelet demand. Li et al. (2020) develop a hybrid model consisting of seasonal and trend decompositionusing Loess (STL) time series and eXtreme Gradient Boosting (XGBoost) for RBC demand forecastingand incorporate it in an inventory management problem.

In this study, we utilize multiple demand forecasting methods, including univariate analysis (timeseries methods) and multivariate analysis (regression and machine learning methods), and evaluate theperformance of these models for platelet demand forecasting. Moreover, in contrast with earlier studies,we explore the value gained from including a range of clinical indicators for platelet demand forecasting.More specifically, we consider clinical indicators, consisting of laboratory test results, patient character-istics and hospital census data as well as statistical indicators, including the previous week’s plateletusage and previous day’s received units. In addition to the linear effects of the clinical indicators, westudy the nonlinear effect of these clinical indictors in our choice of machine learning model. Resultsindicate that platelet demand is dependent on the clinical indicators and therefore including them in thedemand forecasting process enhances the accuracy. Moreover, we explore the effect of having differentamounts of data on the accuracy of the forecasting methods. To the best of our knowledge, this studyis the first that utilizes and evaluates different demand forecasting methodologies from univariate timeseries to multivariate models for platelet products and explores the effect of the amount of available dataon these approaches.

4. Demand Forecasting

4.1. Data Description

The data in this study are constructed by processing CBS shipping data and the TRUST (TransfusionResearch for Utilization, Surveillance and Tracking) database at the McMaster Centre for TransfusionResearch (MCTR) for platelet transfusion in Hamilton hospitals. The study is approved by the CanadianBlood Services Research Ethics Board and the Hamilton Integrated Research Ethics Board.

The dataset ranges from 2010 to 2018 and consists of 61377 transfusions for 47496 patients in Hamil-ton, 48190 transfusions to inpatients and 13187 to outpatients. It is high dimensional, with more than100 variables that can be divided into four main groups: 1. the transfused product specifications such as

Page 9: Demand Forecasting for Platelet Usage: from Univariate

product name and type, received date, expiry date, 2. patient characteristics such as age, gender, patientABO Rh blood type, 3. the transfusion location such as intensive care, cardiovascular surgery, hema-tology, and 4. available laboratory test results for each patient such as platelet count, hemoglobin level,creatinine level, and red cell distribution width.

The data for analysis are processed in two steps: in the first step, we have the granular data thatincludes all of the platelet transfusions. Each row contains product-related information, the recipient’scharacteristics, hospital location information and lab tests. In the second step, a daily-aggregated datasetis constructed with each row containing the daily product, patient-related and location information alongwith the aggregated lab tests. In the daily aggregated dataset, 170 processed variables are included usingstraightforward statistical transformations (e.g. mean, min, max, sum).

Additionally, we add new variables such as the number of platelet transfusions in the previous day andprevious week, the number of received units in the previous day, and day of the week. Table 1 gives theset of variables that are used in this study along with their descriptions. These variables are selected by alasso regression model (Tibshirani, 1996) which is explained in detail in Section 4.4. Since the ABO Rhblood type compatibility between the patient and the product is not necessary (although preferable) forplatelet transfusion, it is not considered as a model variable.

One of the data characteristics is that data variables, in particular abnormal laboratory test results, arehighly correlated, as shown in Fig. 5. These high correlations give rise to some challenges when datavariables are considered in the demand forecasting process, as will be seen in Section 4.4.

As we can see from Table 1, data variables have different ranges, and hence are standardized byremoving the mean and scaling to unit variance by yi = (xi−ui)/si, where x is the variable, u is its meanand s is its standard deviation. All data processing and analysis and model implementations are carriedout using the Python 3.7 programming language. We implement four models and train them for twoscenarios. In the first scenario, we train each model for two years of data from 2016 to 2017 and we usedata from 2018 for testing. In the second scenario, each model is trained with data from 2010 to 2017for eight years, and is tested with 2018 data. We use Mean Absolute Percentage Error (MAPE) and RootMean Square Error (RMSE) to evaluate model performance.

4.2. The ARIMA model

An autoregressive integrated moving average model consists of three components, an autoregressive(AR) component that considers a linear combination of lagged values as the predictors, a moving average(MA) component of past forecast errors (white noise), and an integrated component where differencingis applied on the data to make it stationary. Let y1,y2, . . . ,yt be the observations over time period t; thetime series can be written as:

yt = f (yt−1,yt−2,yt−3, . . . ,yt−n)+ εt (1)

An ARIMA model assumes that the value of an observation is a linear function of a number of previouspast observations and stochastic terms. The stochastic term, εt , is independent of previous observationsand is identically distributed for each t, following a normal distribution with zero mean. The ARIMA

Page 10: Demand Forecasting for Platelet Usage: from Univariate

Table 1: Data variable definition and description

Name Description

abnormal ALP Number of patients with abnormal alkaline phosphatase

abnormal MPV Number of patients with abnormal mean platelet volume

abnormal hematocrit Number of patients with abnormal hematocrit

abnormal PO2 Number of patients with abnormal partial pressure of oxygen

abnormal creatinine Number of patients with abnormal creatinine

abnormal INR Number of patients with abnormal international normalized ratio

abnormal MCHb Number of patients with abnormal mean corpuscular hemoglobin

abnormal MCHb conc Number of patients with abnormal mean corpuscular hemoglobin concentration

abnormal hb Number of patients with abnormal hemoglobin

abnormal mcv Number of patients with abnormal mean corpuscular volume

abnormal plt Number of patients with abnormal platelet count

abnormal redcellwidth Number of patients with abnormal red cell distribution width

abnormal wbc Number of patients with abnormal white cell count

abnormal ALC Number of patients with abnormal absolute lymphocyte count

location GeneralMedicine Number of patients in general medicine

location Hematology Number of patients in hematology

location IntensiveCare Number of patients in intensive care

location CardiovascularSurgery Number of patients in cardiovascular surgery

location Pediatric Number of patients in pediatrics

Monday Indicating the day of the week

Tuesday Indicating the day of the week

Wednesday Indicating the day of the week

Thursday Indicating the day of the week

Friday Indicating the day of the week

Saturday Indicating the day of the week

Sunday Indicating the day of the week

lastWeek Usage Number of units transfused in the previous week

yesterday Usage Number of platelet units transfused in the previous day

yesterday ReceivedUnits Number of units received by the hospital in the previous day

model can be written as:

yt = µ +ϑ1yt−1 +ϑ2yt−2 +ϑ3yt−3 + · · ·+ϑpyt−p + εt

−φ1εt−1−φ2εt−2−φ3εt−3−·· ·−φqεt−q (2)

where µ is a constant, ϑi and φ j are model parameters in which i = 1,2, . . . , p and j = 0,1,2, . . . ,q, pand q are the model orders and define the number of autoregressive terms and moving average terms,

Page 11: Demand Forecasting for Platelet Usage: from Univariate

abno

rmal

_ALP

abno

rmal

_mpv

abno

rmal

_hem

atoc

rit

abno

rmal

_pO2

abno

rmal

_cre

atin

ine

abno

rmal

_INR

abno

rmal

_MCH

b

abno

rmal

_MCH

b_co

nc

abno

rmal

_hb

abno

rmal

_mcv

abno

rmal

_plt

abno

rmal

_red

cellw

idth

abno

rmal

_wbc

abno

rmal

_ALC

loca

tion_

Gene

ralM

edici

ne

loca

tion_

Hem

atol

ogy

loca

tion_

Inte

nsiv

eCar

e

loca

tion_

Card

iova

scul

arSu

rger

y

loca

tion_

Pedi

atric

Mon

day

Tues

day

Wed

nesd

ay

Thur

sday

Frid

ay

Satu

rday

Sund

ay

last

Wee

k_Us

age

yest

erda

y_Us

age

yest

erda

y_Re

ceiv

edUn

its

abnormal_ALP

abnormal_mpv

abnormal_hematocrit

abnormal_pO2

abnormal_creatinine

abnormal_INR

abnormal_MCHb

abnormal_MCHb_conc

abnormal_hb

abnormal_mcv

abnormal_plt

abnormal_redcellwidth

abnormal_wbc

abnormal_ALC

location_GeneralMedicine

location_Hematology

location_IntensiveCare

location_CardiovascularSurgery

location_Pediatric

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

Sunday

lastWeek_Usage

yesterday_Usage

yesterday_ReceivedUnits

1 0.34 0.46 0.25 0.34 0.41 0.26 0.18 0.4 0.35 0.45 0.39 0.34 0.33 0.27 0.25 0.33 0.13 0.18 0.1 0.083 0.078 0.12 0.1 -0.048-0.089 0.22 0.17 0.12

0.34 1 0.68 0.53 0.41 0.66 0.44 0.43 0.62 0.52 0.64 0.45 0.46 0.38 0.45 0.35 0.36 0.37 0.25 0.12 0.18 0.16 0.15 0.18 -0.14 -0.14 0.24 0.21 0.14

0.46 0.68 1 0.61 0.53 0.8 0.39 0.26 0.84 0.64 0.81 0.62 0.53 0.46 0.53 0.46 0.45 0.41 0.26 0.14 0.22 0.18 0.19 0.21 -0.16 -0.16 0.28 0.26 0.19

0.25 0.53 0.61 1 0.41 0.61 0.28 0.15 0.57 0.39 0.5 0.34 0.51 0.25 0.34 0.071 0.34 0.7 0.12 0.12 0.21 0.2 0.17 0.13 -0.18 -0.22 0.04 0.15 0.11

0.34 0.41 0.53 0.41 1 0.53 0.25 0.19 0.57 0.34 0.56 0.39 0.46 0.33 0.31 0.22 0.49 0.28 0.095 0.062 0.16 0.16 0.12 0.13 -0.065-0.085 0.17 0.24 0.17

0.41 0.66 0.8 0.61 0.53 1 0.42 0.28 0.83 0.6 0.91 0.55 0.51 0.41 0.62 0.56 0.37 0.55 0.35 0.18 0.25 0.26 0.24 0.25 -0.26 -0.26 0.26 0.27 0.18

0.26 0.44 0.39 0.28 0.25 0.42 1 0.54 0.4 0.61 0.4 0.36 0.33 0.28 0.26 0.28 0.23 0.22 0.17 0.087 0.11 0.091 0.099 0.13 -0.1 -0.1 0.2 0.16 0.11

0.18 0.43 0.26 0.15 0.19 0.28 0.54 1 0.3 0.26 0.29 0.26 0.23 0.22 0.18 0.21 0.21 0.095 0.1 0.063 0.08 0.1 0.037 0.049-0.051-0.052 0.19 0.11 0.067

0.4 0.62 0.84 0.57 0.57 0.83 0.4 0.3 1 0.55 0.84 0.53 0.48 0.41 0.47 0.53 0.46 0.46 0.27 0.15 0.21 0.22 0.2 0.21 -0.16 -0.19 0.25 0.26 0.19

0.35 0.52 0.64 0.39 0.34 0.6 0.61 0.26 0.55 1 0.59 0.42 0.33 0.36 0.41 0.4 0.27 0.26 0.27 0.11 0.17 0.11 0.15 0.17 -0.14 -0.13 0.27 0.23 0.14

0.45 0.64 0.81 0.5 0.56 0.91 0.4 0.29 0.84 0.59 1 0.59 0.47 0.45 0.61 0.6 0.43 0.39 0.35 0.17 0.23 0.24 0.21 0.23 -0.21 -0.21 0.31 0.29 0.19

0.39 0.45 0.62 0.34 0.39 0.55 0.36 0.26 0.53 0.42 0.59 1 0.42 0.35 0.47 0.31 0.29 0.23 0.26 0.1 0.12 0.15 0.13 0.19 -0.16 -0.12 0.16 0.18 0.13

0.34 0.46 0.53 0.51 0.46 0.51 0.33 0.23 0.48 0.33 0.47 0.42 1 0.22 0.37 0.14 0.36 0.35 0.19 0.08 0.15 0.13 0.12 0.13 -0.091 -0.11 0.12 0.15 0.12

0.33 0.38 0.46 0.25 0.33 0.41 0.28 0.22 0.41 0.36 0.45 0.35 0.22 1 0.19 0.29 0.36 0.11 0.12 0.093 0.062 0.082 0.071 0.098-0.013-0.021 0.24 0.17 0.11

0.27 0.45 0.53 0.34 0.31 0.62 0.26 0.18 0.47 0.41 0.61 0.47 0.37 0.19 1 0.1 0.053 0.28 0.35 0.16 0.22 0.18 0.095 0.26 -0.3 -0.28 0.09 0.1 0.039

0.25 0.35 0.46 0.071 0.22 0.56 0.28 0.21 0.53 0.4 0.6 0.31 0.14 0.29 0.1 1 0.042 0.099 0.21 0.097 0.06 0.096 0.16 0.14 -0.066-0.035 0.3 0.21 0.15

0.33 0.36 0.45 0.34 0.49 0.37 0.23 0.21 0.46 0.27 0.43 0.29 0.36 0.36 0.053 0.042 1 -0.012 0.11 0.075 0.063 0.078 0.09 0.073 0.022 0.025 0.21 0.2 0.14

0.13 0.37 0.41 0.7 0.28 0.55 0.22 0.095 0.46 0.26 0.39 0.23 0.35 0.11 0.28 0.099-0.012 1 0.073 0.11 0.24 0.21 0.14 0.1 -0.23 -0.280.000270.097 0.075

0.18 0.25 0.26 0.12 0.095 0.35 0.17 0.1 0.27 0.27 0.35 0.26 0.19 0.12 0.35 0.21 0.11 0.073 1 0.043 0.13-0.00410.15 0.053-0.055 -0.05 0.094 0.098 0.073

0.1 0.12 0.14 0.12 0.062 0.18 0.087 0.063 0.15 0.11 0.17 0.1 0.08 0.093 0.16 0.097 0.075 0.11 0.043 1 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 0.039 -0.32 -0.46

0.083 0.18 0.22 0.21 0.16 0.25 0.11 0.08 0.21 0.17 0.23 0.12 0.15 0.062 0.22 0.06 0.063 0.24 0.13 -0.15 1 -0.15 -0.15 -0.15 -0.15 -0.15 0.033 0.089 0.15

0.078 0.16 0.18 0.2 0.16 0.26 0.091 0.1 0.22 0.11 0.24 0.15 0.13 0.082 0.18 0.096 0.078 0.21-0.0041-0.15 -0.15 1 -0.15 -0.15 -0.15 -0.15 0.034 0.18 0.09

0.12 0.15 0.19 0.17 0.12 0.24 0.099 0.037 0.2 0.15 0.21 0.13 0.12 0.071 0.095 0.16 0.09 0.14 0.15 -0.15 -0.15 -0.15 1 -0.15 -0.15 -0.15 0.033 0.19 0.19

0.1 0.18 0.21 0.13 0.13 0.25 0.13 0.049 0.21 0.17 0.23 0.19 0.13 0.098 0.26 0.14 0.073 0.1 0.053 -0.15 -0.15 -0.15 -0.15 1 -0.15 -0.15 0.039 0.16 0.17

-0.048 -0.14 -0.16 -0.18 -0.065 -0.26 -0.1 -0.051 -0.16 -0.14 -0.21 -0.16 -0.091-0.013 -0.3 -0.0660.022 -0.23 -0.055 -0.15 -0.15 -0.15 -0.15 -0.15 1 -0.14 0.04 0.19 0.2

-0.089 -0.14 -0.16 -0.22 -0.085 -0.26 -0.1 -0.052 -0.19 -0.13 -0.21 -0.12 -0.11 -0.021 -0.28 -0.0350.025 -0.28 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.14 1 0.049 -0.3 -0.17

0.22 0.24 0.28 0.04 0.17 0.26 0.2 0.19 0.25 0.27 0.31 0.16 0.12 0.24 0.09 0.3 0.210.000270.094 0.039 0.033 0.034 0.033 0.039 0.04 0.049 1 0.28 0.2

0.17 0.21 0.26 0.15 0.24 0.27 0.16 0.11 0.26 0.23 0.29 0.18 0.15 0.17 0.1 0.21 0.2 0.097 0.098 -0.32 0.089 0.18 0.19 0.16 0.19 -0.3 0.28 1 0.67

0.12 0.14 0.19 0.11 0.17 0.18 0.11 0.067 0.19 0.14 0.19 0.13 0.12 0.11 0.039 0.15 0.14 0.075 0.073 -0.46 0.15 0.09 0.19 0.17 0.2 -0.17 0.2 0.67 10.4

0.2

0.0

0.2

0.4

0.6

0.8

1.0

Fig. 5: Pearson correlation among variables

respectively.In order to apply the ARIMA model on a time series, one should first make it stationary. We use

the Augmented Dickey-Fuller (ADF) test (Cheung and Lai, 1995) to examine our time series data forstationarity. Given a stationary time series, in the next step, model parameters are estimated such thatthe error is minimized. We estimate the parameters using the Hyndman-Khandakar algorithm whichuses a stepwise search for a combination of p and q to minimize AIC (Akaike information criterion)(Sakamoto et al.). Having the model fitted based on the estimated parameters, the next step is to evaluateit for which we calculate RSME and MAPE errors and also examine the model residuals through ACF(Autocorrelation Function) and PACF (Partial Autocorrelation Function) plots. By using the ARIMAmodel discussed above, we train the model for two years: 2016 and 2017. Fig. 6 depicts the actualdemand and the predicted demand from the ARIMA model. The RMSE and MAPE for the predictionsare 8.13 and 46.32%, respectively. As we can see from Fig. 6, the ARIMA model cannot capture demandvariations and its forecasts are close to the mean daily units transfused (18.67).

Page 12: Demand Forecasting for Platelet Usage: from Univariate

2017-01 2017-04 2017-07 2017-10 2018-01 2018-04 2018-07 2018-10Date

10

20

30

40

50

Dai

ly D

eman

d

Actual DemandTrainTest

Fig. 6: Demand forecasting with ARIMA

To perform a deeper investigation of the high forecasting error, we examine the model residuals, ACFand PACF, to find any possible correlation that remains in the differentiated time series. Fig. 7(a) showsthat the residuals are normally distributed with zero mean, meaning that no trend exists for the modelresiduals. The ACF plot (Fig. 7(b)) represents the coefficients of correlation between a value and its lag,and the PACF (Fig. 7(c)) plot illustrates the conditional correlation between the value and its lag. As wecan see from Fig. 7, there is an autocorrelation and partial autocorrelation at time seven (and multiplesof seven) due to weekly seasonality that is not incorporated in the model.

In the next step, we train an ARIMA model with the whole dataset for eight years from 2010 to 2017,and use one differentiation to induce stationarity in the data. Fig. 8 shows the result of demand fore-casting for 2018 with an ARIMA model trained for the previous eight years. As we can see, forecastsare improved notably with RMSE of 5.72 and MAPE of 28.96%. The results show that ARIMA hasa significant improvement when moving from two years to eight years worth of data. Since ARIMA’sforecasts are only based on the previous demands, and the seasonality in data has not changed signifi-cantly during the eight years, the model parameters, p and q, are more robust for longer time series dataresulting in more accurate forecasts. The performance of the ARIMA model trained with two years andeight years of data are presented in Table 2.

As the results indicate, when a limited amount of data are available, the ARIMA model has a highforecast error not only because its forecasts are solely based on the previous demands, but also due tothe fact that it cannot capture the seasonality in data. Since seasonality is one of the primary features ofour time series data, in the next section, we include seasonality directly in the forecasting process.

Page 13: Demand Forecasting for Platelet Usage: from Univariate

−3 −2 −1 0 1 2 3

−20

−10

010

20

Normal Q−Q Plot

Theoretical Quantiles

Sam

ple

Qua

ntile

s

(a) Model Residuals

0 5 10 15 20 25 300.2

0.0

0.2

0.4

0.6

0.8

1.0

Autocorrelation

(b) ACF

0 5 10 15 20 25 30

0.0

0.2

0.4

0.6

0.8

1.0

Partial Autocorrelation

(c) PACF

Fig. 7: Model residuals, ACF and PACF correlation-ARIMA trained for two years

Table 2: ARIMA’s performance with different amounts of training data

Train Test

RMSE MAPE RMSE MAPE

ARIMA trained for 2 years 6.77 33.44% 8.13 46.32%

ARIMA trained for 8 years 5.86 30.49% 5.72 28.96%

Page 14: Demand Forecasting for Platelet Usage: from Univariate

2017-01 2017-04 2017-07 2017-10 2018-01 2018-04 2018-07 2018-10Date

0

10

20

30

40

50

Dai

ly D

eman

d

Actual DemandTrainTest

Fig. 8: Demand forecasting with ARIMA - training for 8 years

4.3. Prophet model

Prophet is a time series model introduced by Taylor and Letham (2018) that considers common featuresof business time series: trends, seasonality, holiday effects and outliers. Let g(t) be the trend functionwhich shows the long-term pattern of data, s(t) be the seasonality which captures the periodic fluctu-ations in data such as weekly, monthly or yearly patterns, and finally h(t) be the non-periodic holidayeffect. These features are combined through a generalized additive model (GAM) (Hastie and Tibshirani,1987), and the Prophet time series model can be written as:

y(t) = g(t)+ s(t)+h(t)+ εt (3)

The normally distributed error εt is added to model the residuals. The Prophet model was developedfor forecasting events created on Facebook and is implemented as an open source software package inboth Python and R. Using the Prophet model described above, we construct a demand forecast model forour data. We consider weekly and yearly seasonality as observed in Fig. 2. Moreover, we add Canadianholiday events through the built-in country-specific holiday method in Python. Fig. 9 illustrates thecomponents of the forecasts for the training and testing period, the trend, holidays, weekly seasonality,and yearly seasonality. As we can see from Fig. 9, there is a downward trend from the beginning of 2016to July 2017 and an upward trend from July 2017 to the end of 2018. Besides, almost all holidays havea negative effect on the model, except for July 1st. This means that the demand is lower than regularweekdays for almost all of the holidays, except for July 1st. However, when the holidays are removedfrom the model, the model performance decreases.

We can also see that there is weekly seasonality in which Wednesdays have the highest platelet usagewhile the weekends have the lowest usage, in qualitative agreement with Fig. 2. Moreover, the monthlyseasonality, captured by Fourier series in the Prophet model, depicts three cycles: 1. January to May inwhich March has the highest demand while May has the lowest demand; 2. May to September in whichthe demand is highly variable. July has the highest demand in this cycle and the highest demand of all

Page 15: Demand Forecasting for Platelet Usage: from Univariate

2016-03 2016-07 2016-11 2017-03 2017-07 2017-11 2018-03 2018-07 2018-1119

20

21

22

23

24

25

trend

2016-03 2016-07 2016-11 2017-03 2017-07 2017-11 2018-03 2018-07 2018-11

2

1

0

1

holidays

Sunday Monday Tuesday Wednesday Thursday Friday SaturdayDay…of…week

6

4

2

0

2

weekly

January…1 March…1 May…1 July…1 September…1 November…1 January…1Day…of…year

2

1

0

1

2

3

yearly

2016-03 2016-07 2016-11 2017-03 2017-07 2017-11 2018-03 2018-07 2018-1119

20

21

22

23

24

25

trend

2016-03 2016-07 2016-11 2017-03 2017-07 2017-11 2018-03 2018-07 2018-11

2

1

0

1

holidays

Sunday Monday Tuesday Wednesday Thursday Friday SaturdayDay of week

6

4

2

0

2

weekly

January March May July September November JanuaryDay of year

2

1

0

1

2

3

yearly

Fig. 9: Prophet model for demand forecasting

months while May has the lowest demand in the cycle and also the lowest demand of all months; 3.September to January with a slight variation in demand - November with the highest and January withthe lowest demands.

Table 3: Prophet’s performance with different amount of training data

Train Test

RMSE MAPE RMSE MAPE

Prophet model trained for 2 years 5.83 26.05% 6.64 37.73%

Prophet model trained for 8 years 5.48 28.89% 5.99 30.93%

The results of predictions with the Prophet model are illustrated in Fig. 10. The black dots are actualdemand values, and the blue line shows the model forecasts with the 95% uncertainty interval for theforecasts. The Prophet model has an RMSE of 6.64 and MAPE of 37.73% for the forecasted values.By removing holidays from the model, there are slightly higher forecasting errors, RMSE of 6.84 andMAPE of 39.26%.

As a further step, the Prophet model is trained with data from 2010 to 2017 and tested with data in2018, resulting in more accurate forecasts with test RMSE of 5.99 and test MAPE of 30.93%. Table 3presents the performance of the Prophet model trained with two years and eight years of data. UnlikeARIMA, the Prophet model’s accuracy is not significantly affected as the amount of data increases.

Given that Prophet’s forecasting errors are high, in the next step we explore the effect of includingclinical indicators in the forecasting process.

4.4. Lasso Regression

Lasso regression is a linear regression method that was popularized by Tibshirani (1996) to performfeature selection and regularization. We use lasso regression since it allows clinical indicators to be

Page 16: Demand Forecasting for Platelet Usage: from Univariate

2016-03 2016-07 2016-11 2017-03 2017-07 2017-11 2018-03 2018-07 2018-11Date

0

10

20

30

40

50

Dai

ly De

man

d

Fig. 10: Demand forecasting with Prophet model

included in the demand forecast model. In order to do so, the lasso method puts a constraint on the sumof the absolute values of the model weights to be less than a certain value. This results in some of thevariable weights being set to zero. In other words, it performs variable selection to reduce the complexityof the model, as well as improving the prediction accuracy. This not only results in interpretable models,but also tends to reduce overfitting. By considering the actual demand on day i (i = 1,2, ...,N) as yiand the predicted demand on day i as the product of the clinical indicators (zi j) and their correspondingweights β j ,where j specifies the clinical indicator and j = 1,2, ...,M, the lasso model is the solution tothe following optimization problem:

argminN

∑i=1

(yi−∑j

β jzi j)2 +λ

M

∑j=1|β j| (4)

subject to |β j| ≤ t. (5)

The optimization problem defined in (4)-(5) chooses the weights, β , that minimize the sum of squares ofthe errors between the actual values (y) and the predicted values, with a sparsity penalty (λ ) on the sumof the absolute values of the model weights. Constraint (5) forces some of the weights (that have a minorcontribution to the estimate) to be zero. Variables that have non-zero weights are selected in the model.In this study, lasso regression is used as a variable selection method to find important clinical indicatorsfor platelet demand. Subsequently, this information is used for demand forecasting. Lasso regressionrequires selection of the penalty weight λ . For our data, λ is chosen based on five-fold cross-validation.

In order to calculate the uncertainty of the resulting predictor, confidence intervals are calculated forthe weights as well as the resulting demand forecasts. There are multiple methods for calculating theconfidence interval for lasso regression; one of the most popular is the bootstrap method (Efron and

Page 17: Demand Forecasting for Platelet Usage: from Univariate

Tibshirani, 1994) which is a widely-used non-parametric method for estimating statistics such as meanand standard deviation of an estimate by sampling the data with replacement. It can also be used toestimate the accuracy of a machine learning method for forecasting. The bootstrap method is used in theexperiments for calculating confidence intervals for the lasso regression forecasts and the weights.

Table 4 gives the selected variables that result in an RMSE of 5.52 and MAPE of 24.26% for thetwo years of data training set and RMSE of 5.93 and MAPE of 28.55% for the testing set. Consider-ing the weights for the variables and their corresponding confidence intervals in Table 4, and based on(Ranstam, 2012), variables that have zero weights and confidence intervals that are symmetric aroundzero are candidates to be eliminated. As we can see from Table 4, abnormal plt has the highest weight.The variables abnormal hb and abnormal redcellwidth can be considered as two other important labtests for forecasting the demand. Day of the week, last week’s platelet usage and yesterday’s plateletusage also have notable impact on the platelet demand. As we can see in Table 4, unexpectedly, someof the variables have a negative weight in the demand forecasting model. The reason is that, as we cansee from Fig. 5, there are high correlations among the variables that result in interactions among themodel predictors, which may cause multicollinearity issues. Specifically, the variables abnormal hb, ab-normal INR, abnormal hematocrit, and abnormal MPV are correlated with abnormal plt. The variablesabnormal hematocrit and abnormal hb also have high correlations with most of the other abnormal lab-oratory test results. Fig. 11 depicts the actual and predicted demand for 2018. The green line is thepredicted demand while the yellow and red lines are the limits of the confidence intervals. We use thebootstrap method for computing the confidence intervals, thus for a 95% confidence interval, the confi-dence interval lines indicate the range where 95% of the predictions for 1000 runs fall into. As illustratedin Fig. 11, there is not a large gap between these bounds. This small gap depicts the fact that the fore-casted values have small variation for the 1000 runs.

It appears that the model does some degree of smoothing and thus cannot detect the sharp peaks. Thereason is that regression models tend to be regressed on the expectation of the outcome, and are not goodat capturing the extreme derivations from this expectation. However, as shown in Fig. 11, smoothingmostly occurs for the maxima rather than the minima. In other words, the model potentially has largeerrors when there is unexpected excess demand, for example in emergency situations.

Using the bootstrap method, confidence intervals can also be computed for the weights. As shownin Fig. 12, the weights have a wide range, so we see high values (abnormal plt = 0.23) as well as lowvalues (Friday = -0.39) for the lab tests and day of the week data. Overall, the range of the weights for the95% confidence interval is narrow which implies that there are small margin of errors for the forecastedvalues.

The variables and their corresponding weights are given in Table 4. The weights for lab tests arehigh. This is consistent with the observation that the lab test results are significant indicators for platelettransfusion. The variables abnormal plt, abnormal hb, abnormal ALC and abnormal wbc have higherweights and consequently higher impact on platelet demand. For day of the week, Friday and Saturdayhave negative weights due to the fact that they cover the weekend (Friday: -0.39 and Saturday: -0.31).For hospital census data, except for location GeneralMedicine, all the weights are in a similar range tothe lab tests. Similar to the other methods, the lasso model is also trained for eight years data, from2010 to 2017, and tested for 2018 data. The results, presented in Table 5, indicate that there is not muchdifference for the lasso method when there is a large amount of data for training.

Page 18: Demand Forecasting for Platelet Usage: from Univariate

Table 4: Variables and their corresponding weights for lasso

Variables Weights 95% Confidence Interval

abnormal ALP -0.02 (-0.08 , 0.04)

abnormal MPV 0.01 (-0.06 , 0.11)

abnormal hematocrit 0.00 (-0.11 , 0.14)

abnormal PO2 -0.11 (-0.19 , 0.00)

abnormal creatinine 0.03 (-0.03 , 0.11)

abnormal INR 0.06 (-0.02 , 0.22)

abnormal MCHb -0.03 (-0.10 , 0.04)

abnormal MCHb conc -0.03 (-0.10 , 0.04)

abnormal hb 0.05 (-0.04 , 0.19)

abnormal mcv -0.03 (-0.11 , 0.04)

abnormal plt 0.23 (0.02 , 0.36)

abnormal redcellwidth 0.07 (0.00 , 0.15)

abnormal wbc -0.02 (-0.09 , 0.03)

abnormal ALC 0.01 (-0.05 , 0.08)

location GeneralMedicine -0.11 (-0.21 , 0.00)

location Hematology 0.04 (-0.02 , 0.16)

location IntensiveCare 0.05 (-0.01 , 0.15)

location CardiovascularSurgery 0.04 (-0.03 , 0.11)

location Pediatric 0.04 (-0.02 , 0.10)

Monday 0.07 (0.00 , 0.16)

Tuesday 0.07 (0.00 , 0.14)

Wednesday 0.00 (-0.04 , 0.07)

Thursday 0.01 (-0.03 , 0.09)

Friday -0.39 (-0.46 , -0.31)

Saturday -0.31 (-0.39 , -0.23)

Sunday 0.10 (0.03 , 0.18)

lastWeek Usage 0.12 (0.05 , 0.19)

yesterday Usage 0.10 (0.02 , 0.17)

yesterday ReceivedUnits 0.06 (0.00 , 0.14)

Table 5: Lasso’s performance with different amount of training data

Train Test

RMSE MAPE RMSE MAPE

Lasso for 2 years 5.52 24.26% 5.93 28.55%

Lasso for 8 years 5.49 29.85% 5.78 28.02%

Page 19: Demand Forecasting for Platelet Usage: from Univariate

0

5

10

15

20

25

30

35

40

45

01-Jan-18 01-Feb-18 01-Mar-18 01-Apr-18 01-May-18 01-Jun-18 01-Jul-18 01-Aug-18 01-Sep-18 01-Oct-18 01-Nov-18 01-Dec-18

ActualDemand LowerBound PredictedDemand UpperBound

Fig. 11: Confidence interval for lasso prediction

-0.60

-0.50

-0.40

-0.30

-0.20

-0.10

0.00

0.10

0.20

0.30

0.40

0.50

Coefficients LowerBound UpperBound

Fig. 12: Confidence interval for weights - Lasso

While our goal is to have the minimum forecasting error, we want our models to be interpretable.Since there are high correlations as well as potential nonlinear relationships among the model variablesand the linear models are not able to handle them, some unexpected weights appear in the model output.Consequently, in the next section, we forecast platelet demand with a machine learning method, LSTMnetworks, to explore such issues.

Page 20: Demand Forecasting for Platelet Usage: from Univariate

4.5. LSTM Networks

LSTM networks are a class of recurrent neural networks (RNN) that were introduced by (Hochreiter andSchmidhuber, 1997) and are capable of learning long-term dependencies in sequential data. In theory,RNNs should be capable of learning long-term dependencies, however they suffer from the so-calledvanishing gradient problem. Consequently, LSTM networks are designed to resolve this issue. SinceLSTM networks are able to work with sequential data with long-term dependencies, they have beenwidely used in various areas such as finance (Fischer and Krauss, 2018; Qiu et al., 2020), medicine(Wang et al., 2020; Kim and Chung; Bouhamed, 2020), environment (Le et al., 2019; Zhang et al., 2019)and transportation (Lv et al., 2014) for time series forecasting, pattern recognition, speech recognition(Smagulova and James, 2019) and classification (Zhou et al., 2019).

We train an LSTM network for two years from 2016 to 2017 toward the minimum MSE and test it forone year, 2018. We perform grid search hyperparameter tuning to find the best parameters. Model inputvariables are selected via the lasso method discussed in the previous section. As the number of inputsincreases, both the data variables that make data wide and the data rows that make data tall, LSTMperformance tends to decrease because it is highly dependent on the input size. Moreover, wide dataresults in model overfitting (Lai et al., 2018). Having wide data, one can apply a feature selection methodsuch as lasso to reduce the number of variables and regularize the input. However, hyperparameter tuningand training for a large amount of historical data are still time consuming, resulting in a tradeoff betweenaccuracy and time and memory complexity.

2017-01 2017-04 2017-07 2017-10 2018-01 2018-04 2018-07 2018-10Date

10

20

30

40

50

Dai

ly D

eman

d

Actual DemandTrainTest

Fig. 13: Demand forecasting with LSTM

We implemented the LSTM network using the TensorFlow package (Abadi et al., 2016). The LSTMnetwork is trained by using the ADAM optimizer (Kingma and Ba, 2014), and MSE (Mean Square Error)is used as the loss function for this optimizer. Forecasting results are presented in Fig. 13 with RMSE of4.28 and MAPE of 16.59 % for the training set and RMSE of 6.77 and MAPE of 28.03% for the testingset. Forecasting problems can have linear or nonlinear relationships among the model variables. Due tothe fact that LSTM networks can work on both linear and nonlinear time series, and are able to capture

Page 21: Demand Forecasting for Platelet Usage: from Univariate

the nonlinear dependencies, it can outperform linear regression models when there exists long termcorrelations in the time series. Based on the LSTM results, we conclude that long term correlations andnonlinearity are not major issues for our data since the LSTM model does not significantly outperformlasso regression.

We also train the LSTM with eight years of data. Despite the long time spent for hyperparameter tuningand training, its performance is similar to having two years of data meaning that the LSTM network hasrobust performance with different data volumes. Table 6 gives the performance of LSTM networks whentrained with two years vs. eight years of data. As we can see from Table 6, having a larger amount ofdata reduces overfitting in the LSTM network.

Table 6: LSTM’s performance with different amount of training data

Train Test

RMSE MAPE RMSE MAPE

LSTM for 2 years 4.28 16.59% 6.77 28.03%

LSTM for 8 years 4.52 25.53% 6.65 28.52%

5. Comparison and Discussion

In this section, we compare the methods and provide recommendations for using these methods in vari-ous scenarios. In Section 5.1 we compare the methods based on the first scenario (two years of data), inSection 5.2 we discuss the impact of an increased amount of data on the forecasting methods. In Section5.3 we provide overall recommendations.

5.1. Univariate versus Multivariate Models

We have presented four different models for platelet demand forecasting that can be divided into twogroups: univariate and multivariate. Univariate models, ARIMA and Prophet, forecast future demandbased only on the demand history. The ARIMA model only considers a limited number of previousvalues, while the Prophet model incorporates the historical data, seasonality and holiday effects into thedemand forecasting model and improves the forecasting accuracy by approximately 10% compared toARIMA with two years of data. This highlights the impact of weekday/weekend and holiday effect in theplatelet demand variation. As we discussed in Section 2, there is a weekday/weekend effect for plateletdemand, which is not (directly) captured in the ARIMA model.

Multivariate models, on the other hand, incorporate clinical indicators as well as historical demanddata for demand forecasting. We use lasso regression to select the dominant clinical indicators that affectthe demand. Lasso regression examines the linear relationship among the clinical indicators and theirinfluence on the demand. However, as presented in Fig. 5, there are several correlations among theclinical indicators. There may also be nonlinear relationships among these clinical indicators that cannotbe captured by a linear regression model. These issues motivate us to use a machine learning approach,

Page 22: Demand Forecasting for Platelet Usage: from Univariate

LSTM networks, that also accounts for the nonlinearities among these variables. Moreover, an LSTMnetwork is capable of retaining the past information while forgetting some parts of the historical data.Table 7 summarizes the train and test errors for all the models. As we can see from the table, LSTM andlasso models outperform other methods, owing to the addition of the clinical indicators. However, oneshould be cautious using an LSTM model since it has higher time and memory complexity in comparisonto other methods.

Table 7: Demand Forecasting Model Comparisons

Train Test

RMSE MAPE RMSE MAPE

Univariate Models

ARIMA trained for 2 years 6.77 33.44% 8.13 46.32%Prophet trained for 2 years 5.83 26.05% 6.64 37.73%ARIMA trained for 8 years 5.86 30.49% 5.72 28.96%Prophet trained for 8 years 5.48 28.89% 5.99 30.93%

Multivariate Models

Lasso trained for 2 years 5.52 24.26% 5.93 28.55%LSTM trained for 2 years 4.28 16.59% 6.77 28.03%Lasso trained for 8 years 5.49 29.85% 5.78 28.02%LSTM trained for 8 years 4.54 25.53% 6.65 28.52%

5.2. Two Years versus Eight Years of Data

As discussed in Section 4, we train our models for two scenarios, with two years and eight years of data,respectively. Since there is no trend in the data from 2016 onwards (see Fig. 4), in the first scenario themodels are trained for two years (2016 to 2017). With this amount of data, forecasts are not accuratefor univariate time series approaches, and one needs to include the clinical indicators in the forecastingmodel (see Table 7). However, by dedicating eight years of data for training, the ARIMA model’s per-formance improves by approximately 20% and is very close to the multivariate methods. The Prophetmodel, on the other hand, is not significantly affected when more data are available. The reason is that,unlike ARIMA, information about seasonality and holiday effects are explicitly included in the model.

Both of the multivariate models result in small forecasting errors for two years of data for training,whereas they do not perform significantly better as the amount of data increases. This highlights theimportance of including the clinical indicators in the forecasting process.

5.3. General Insights and Recommendations

In general, when there is access only to previous demand values, using a univariate model like Prophetthat explicitly includes the seasonality in data is effective. In the case that several data variables areavailable, lasso regression and LSTM can forecast the demand with high accuracy. Considering thetime and memory complexity, and interpretability of these models, lasso regression has lower time andmemory complexity while it is also very interpretable. Moreover, training an LSTM network needsexpertise in the machine learning area since poor training will cause low-precision results. However, it

Page 23: Demand Forecasting for Platelet Usage: from Univariate

is also worth mentioning that the LSTM network is a robust learning model and is capable of learningthe linear and nonlinear relationships among the model variables even in very short time series data(Boulmaiz et al., 2020; Lipton et al., 2015).

Having a sufficient amount of data, using a traditional method such as ARIMA is also reasonable.Specifically, when there is only access to the previous demand (as is currently the case for CBS) andadequate historical data are available, one can benefit from a simple univariate model like ARIMA.Univariate models are simpler than the multivariate models, and easier to interpret. Machine learningmethods, and specifically deep learning methods, have been shown to be overkill in other areas wheretraditional methods can perform as well as them with lower cost. O’Mahony et al. (2019) comparetraditional computer vision methods with deep learning models. Although computer vision is a populardomain for the application of deep learning methods, O’Mahony et al. (2019) suggest that traditionalmethods are able to perform more efficiently than deep learning methods at lower cost and complexity.Rathore et al. (2018) compare different models for malware detection in which the best result is not fora deep learning method. Our observations are consistent with this line of thought.

6. Conclusion

In this study, we utilize two types of methods for platelet demand forecasting, univariate and multivari-ate methods. Univariate methods, ARIMA and Prophet, forecast platelet demand only by consideringthe historical demand information, while multivariate methods, lasso and LSTM, also consider clini-cal indicators. The high error rate for the univariate models motivates us to utilize clinical indicatorsto investigate their ability to improve the accuracy of forecasts. Results show that lasso regression andLSTM networks outperform the univariate methods when a limited amount of data are available. More-over, since they include clinical predictors in the forecasting process, their results can aid in building arobust decision making and blood utilization system. On the other hand, when there is access to a suffi-cient amount of data, a simple univariate model such as ARIMA can work as well as the more complexmethods.

Future extensions of this work will include: (i) proposing an optimal ordering policy based on thepredicted demand over a planning horizon with ordering cost, wastage cost and shortage (same-dayorder) cost; (ii) further exploring the lasso regression approach to enhance variable selection, with aparticular focus on interpretability (this not only will affect the lasso model itself, but also may improveLSTM forecasting accuracy since LSTM inputs are selected with the lasso regression); (iii) explore thegenerality of the results (outside of Hamilton).

Acknowledgments

This study was funded by the NSERC Discovery Grant program and Mitacs through the AccelerateIndustrial Postdoc program (Grant Number: IT3639) in collaboration with Canadian Blood Services.The funding support from Canadian Blood Services was through the Blood Efficiency Accelerator pro-gram, funded by the federal government (Health Canada) and the provincial and territorial ministries ofhealth. The views herein do not necessarily reflect the views of Canadian Blood Services or the federal,

Page 24: Demand Forecasting for Platelet Usage: from Univariate

provincial, or territorial governments of Canada.The authors thank Tom Courtney, Rick Trifunov, Dr. John Blake, and Masoud Nasari for providing

information about blood collection, blood processing, and blood distribution at Canadian Blood Services.All final decisions regarding manuscript content were made by the authors.

References

Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M., et al., 2016.Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467

Bouhamed, H., 2020. Covid-19 cases and recovery previsions with deep learning nested sequence prediction models with longshort-term memory (LSTM) architecture. Int. J. Sci. Res. in Computer Science and Engineering Vol 8, 2, 10–15.

Boulmaiz, T., Guermoui, M., Boutaghane, H., 2020. Impact of training data size on the LSTM performances for rainfall–runoffmodeling. Modeling Earth Systems and Environment 6, 2153–2164.

Cheung, Y.W., Lai, K.S., 1995. Lag order and critical values of the augmented dickey–fuller test. Journal of Business &Economic Statistics 13, 3, 277–280.

Critchfield, G.C., Connelly, D.P., Ziehwein, M.S., Olesen, L.S., Nelson, C.E., Scott, E.P., 1985. Automatic prediction of plateletutilization by time series analysis in a large tertiary care hospital. American journal of clinical pathology 84, 5, 627–631.

Croson, R., Donohue, K., 2006. Behavioral causes of the bullwhip effect and the observed value of inventory information.Management science 52, 3, 323–336.

Dejonckheere, J., Disney, S.M., Lambrecht, M.R., Towill, D.R., 2004. The impact of information enrichment on the bullwhipeffect in supply chains: A control engineering perspective. European Journal of Operational Research 153, 3, 727–750.

Drackley, A., Newbold, K.B., Paez, A., Heddle, N., 2012. Forecasting ontario’s blood supply and demand. Transfusion 52, 2,366–374.

Efron, B., Tibshirani, R.J., 1994. An introduction to the bootstrap. CRC press.Fischer, T., Krauss, C., 2018. Deep learning with long short-term memory networks for financial market predictions. European

Journal of Operational Research 270, 2, 654–669.Fontaine, M.J., Chung, Y.T., Rogers, W.M., Sussmann, H.D., Quach, P., Galel, S.A., Goodnough, L.T., Erhun, F., 2009. Im-

proving platelet supply chains through collaborations between blood centers and transfusion services. Transfusion 49, 10,2040–2047.

Fortsch, S.M., Khapalova, E.A., 2016. Reducing uncertainty in demand for blood. Operations Research for Health Care 9,16–28.

Frankfurter, G.M., Kendall, K.E., Pegels, C.C., 1974. Management control of blood through a short-term supply-demandforecast system. Management Science 21, 4, 444–452.

Guan, L., Tian, X., Gombar, S., Zemek, A.J., Krishnan, G., Scott, R., Narasimhan, B., Tibshirani, R.J., Pham, T.D., 2017.Big data modeling to predict platelet usage and minimize wastage in a tertiary care system. Proceedings of the NationalAcademy of Sciences 114, 43, 11368–11373.

Hastie, T., Tibshirani, R., 1987. Generalized additive models: some applications. Journal of the American Statistical Association82, 398, 371–386.

Hochreiter, S., Schmidhuber, J., 1997. Long short-term memory. Neural computation 9, 8, 1735–1780.Hospital Liaison Specialists, [Accessed Date: 2020-11-01. Canadian blood services. https://www.blood.ca/en/hospital-services/

customer-service/hospital-liaison-specialists.Khaldi, R., El Afia, A., Chiheb, R., Faizi, R., 2017. Artificial neural network based approach for blood demand forecasting:

Fez transfusion blood center case study. In Proceedings of the 2nd international Conference on Big Data, Cloud andApplications, pp. 1–6.

Kim, J.C., Chung, K., . Prediction model of user physical activity using data characteristics-based long short-term memoryrecurrent neural networks. KSII Transactions on Internet & Information Systems 13, 4, 2060–2077.

Kingma, D.P., Ba, J., 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980Kumar, A., Mhaskar, R., Grossman, B.J., Kaufman, R.M., Tobian, A.A., Kleinman, S., Gernsheimer, T., Tinmouth, A.T., Djul-

begovic, B., Panel, A.P.T.G., 2015. Platelet transfusion: a systematic review of the clinical evidence. Transfusion 55, 5,

Page 25: Demand Forecasting for Platelet Usage: from Univariate

1116–1127.Kumari, D., Wijayanayake, A., 2016. An efficient inventory model to reduce the wastage of blood in the national blood

transfusion service. In 2016 Manufacturing & Industrial Engineering Symposium (MIES), IEEE, pp. 1–4.Lai, G., Chang, W.C., Yang, Y., Liu, H., 2018. Modeling long-and short-term temporal patterns with deep neural networks. In

The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, pp. 95–104.Le, X.H., Ho, H.V., Lee, G., Jung, S., 2019. Application of long short-term memory (LSTM) neural network for flood forecast-

ing. Water 11, 7, 1387.Lestari, F., Anwar, U., Nugraha, N., Azwar, B., 2017. Forecasting demand in blood supply chain (case study on blood transfusion

unit). In Proceedings of the World Congress on Engineering, Vol. 2.Li, N., Chiang, F., Down, D.G., Heddle, N.M., 2020. A decision integration strategy for short-term demand forecasting and

ordering for red blood cell components. arXiv preprint arXiv:2008.07486Lipton, Z.C., Kale, D.C., Elkan, C., Wetzel, R., 2015. Learning to diagnose with LSTM recurrent neural networks. arXiv

preprint arXiv:1511.03677Lv, Y., Duan, Y., Kang, W., Li, Z., Wang, F.Y., 2014. Traffic flow prediction with big data: a deep learning approach. IEEE

Transactions on Intelligent Transportation Systems 16, 2, 865–873.O’Mahony, N., Campbell, S., Carvalho, A., Harapanahalli, S., Hernandez, G.V., Krpalkova, L., Riordan, D., Walsh, J., 2019.

Deep learning vs. traditional computer vision. In Science and Information Conference, Springer, pp. 128–144.Qiu, J., Wang, B., Zhou, C., 2020. Forecasting stock prices with long-short term memory neural network based on attention

mechanism. PloS one 15, 1, e0227222.Ranstam, J., 2012. Why the p-value culture is bad and confidence intervals a better alternative.Rathore, H., Agarwal, S., Sahay, S.K., Sewak, M., 2018. Malware detection using machine learning and deep learning. In

International Conference on Big Data Analytics, Springer, pp. 402–411.Rutherford, C., Cheng, S.Y., Bailie, K., 2016. Evidence of bullwhip in the blood supply chain. In 23rd EurOMA Conference

2016.Sakamoto, Y., Ishiguro, M., Kitagawa, G., . Akaike information criterion statistics. Dordrecht, The Netherlands: D. Reidel 81,

902–926.Samuel, C., Gonapa, K., Chaudhary, P., Mishra, A., 2010. Supply chain dynamics in healthcare services. International journal

of health care quality assurance 23, 7, 631–642.Silva Filho, O.S., Carvalho, M.A., Cezarino, W., Silva, R., Salviano, G., 2013. Demand forecasting for blood components

distribution of a blood supply chain. IFAC Proceedings Volumes 46, 24, 565–571.Silva Filho, O.S., Cezarino, W., Salviano, G.R., 2012. A decision-making tool for demand forecasting of blood components.

IFAC Proceedings Volumes 45, 6, 1499–1504.Smagulova, K., James, A.P., 2019. A survey on LSTM memristive neural network architectures and applications. The European

Physical Journal Special Topics 228, 10, 2313–2324.Stanworth, S.J., New, H.V., Apelseth, T.O., Brunskill, S., Cardigan, R., Doree, C., Germain, M., Goldman, M., Massey, E., Prati,

D., et al., 2020. Effects of the COVID-19 pandemic on supply and use of blood for transfusion. The Lancet Haematology7, 10, E756–E764.

Taylor, S.J., Letham, B., 2018. Forecasting at scale. The American Statistician 72, 1, 37–45.Tibshirani, R., 1996. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B

(Methodological) 58, 1, 267–288.Volken, T., Buser, A., Castelli, D., Fontana, S., Frey, B.M., Rusges-Wolter, I., Sarraj, A., Sigle, J., Thierbach, J., Weingand, T.,

et al., 2018. Red blood cell use in switzerland: trends and demographic challenges. Blood transfusion 16, 1, 73–82.Wang, Y.B., You, Z.H., Yang, S., Yi, H.C., Chen, Z.H., Zheng, K., 2020. A deep learning-based method for drug-target

interaction prediction based on long short-term memory neural network. BMC Medical Informatics and Decision Making20, 2, 1–9.

Zhang, J., Yan, J., Infield, D., Liu, Y., Lien, F.s., 2019. Short-term forecasting and uncertainty analysis of wind turbine powerbased on long short-term memory network and gaussian mixture model. Applied Energy 241, 229–244.

Zhou, Y., Luo, J., Feng, L., Yang, Y., Chen, Y., Wu, W., 2019. Long-short-term-memory-based crop classification using high-resolution optical images and multi-temporal sar data. GIScience & Remote Sensing 56, 8, 1170–1191.