• No results found

Predicting restaurant food product demand : using a hybrid seasonal autoregressive integrated moving average and regression model to better predict food product demand in a company restaurant

N/A
N/A
Protected

Academic year: 2021

Share "Predicting restaurant food product demand : using a hybrid seasonal autoregressive integrated moving average and regression model to better predict food product demand in a company restaurant"

Copied!
88
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Predicting Restaurant Food Product Demand

Using a hybrid seasonal autoregressive integrated moving average

and regression model to better predict food product demand in a

company restaurant

By

Daan Hoevers, MSc

September 2018

Master thesis submitted in partial fulfilment for the degree of

Master of Business Administration (MBA) with a specialization in Big Data &

Business Analytics

Amsterdam Business School

University of Amsterdam

(2)

Abstract

An exploratory qualitative research showed that there is a need and perceived opportunity in the food service industry to further reduce the food waste in their sector. Product forecasting is an important element in the management of inventory of food products and a proper fore-casting can contribute to reducing food waste by ordering the right amount. The development of Big Data in the growth of data sources available and means to analyse the data provides an opportunity to explore whether a forecast of product demand in a company restaurant can be improved by applying the latest forecast models and considering different data sources. A literature review on the use of forecasting methods for the prediction of food product de-mand showed positive results, although a variety of methods were applied in different contexts. It was decided to collect the data for a period of 2.5 years from the The Edge office building restaurant. Albron provided the sales data set, Deloitte provided the building visitor data set, the weather data set was obtained from the Royal Netherlands Meteorological Insti-tute and the data set was enriched with information about the holidays. After the collection, the data was prepared and explored which lead to choosing three products to focus on: sand-wich, most sold product, salad buffet, product generating most revenue and compound dishes, product group comprised of 189 individual products. Part of the data exploration was an assessment of the weather effect on total sales of The Edge restaurant, building visitors and restaurant visitors. The results show that the weather variables do not hold an prediction value for the three aforementioned dependent variables.

The modelling approach, consisted of a Seasonal Autoregressive Integrated Moving Average (SARIMA) time series model in combination with a regression model, i.e. Ordinary Least Squares (OLS), Generalized Linear Model (GLM) – Gamma or Quantile Regression (QR) model. These models were trained on independent variable data sets varying the time period and how the building visitors were included. For the QR model different estimators were constructed. With the trained models, predictions were made which were evaluated using the Mean Absolute Percentage Error (MAPE) and Root Mean Squared Error (RMSE) metrics and compared with a baseline model, a Seasonal Naïve Forecast.

The results show that the best scores of the different combination of SARIMA and regression model outperform the baseline model for each product. The OLS and QR showed in general better results than the GLM-Gamma method.

Based on the results an elaborated business implication section is written to assess the ap-plicability of the forecast on seven criteria and provide recommendations to Albron as well as the building owner or tenant (e.g. Deloitte) for next steps.

(3)

About Supervisors and Author

Primary Supervisor Dr. A. Mohammadi

Faculty of Economics and Business, Section Operations Management, University of Amsterdam

A.Mohammadi@uva.nl

Secondary Supervisor Prof. dr. M. Salomon

Faculty of Economics and Business, Amsterdam Business School, University of Amsterdam

M.Salomon@uva.nl

Business Advisor Douwe Huizinga

Manager Business Intelligence, Albron

Douwe.Huizinga@albron.nl

Author Daan Hoevers, MSc

Student number: 11425873 Senior Manager IoT, Deloitte

DaanHoevers@gmail.com DHoevers@deloitte.nl

(4)

Acknowledgements

The last 2 years has been intense, combining a part-time MBA study with a consulting job. This thesis caps and closes those years and incorporates learnings from the different courses characterising this MBA Big Data & Business Analytics, like statistics, econometrics and machine learning but also supply chain management. I’m thankful for the opportunity to pur-sue this MBA and the support I received from Deloitte’s leadership, especially Helena, Lucien and Ad. I treasure the insights in the exciting and important field of Big Data, the weekday evening classroom lectures, the study trip to Silicon Valley and getting to know my fellow MBA students.

With regard to this thesis, I wish to thank Dr. A. Mohammadi and Prof. dr. M. Salomon for their supervision, direction and guidance during the process of writing this thesis. Without them I would not have been able to deliver this result.

Furthermore, writing this thesis would not have been possible without the cooperation of col-leagues from Deloitte and Albron. The initial idea for this thesis was born in discussions with my colleague Alberto and elaborated on in the MBA Entrepreneur class with fellow students Frits, Cyril and Mark. Albron and in particular Douwe Huizinga, provided data and business background which are imperative for this thesis. Patrick from Deloitte IT and Workplace Support found time to unlock The Edge building visitor data, which was kindly turned into useful tables by Paulien. Colleagues Helena and Rob supported this thesis process by provid-ing me the so needed time and moral support.

Last but not least, I would like to thank my fellow MBA students, family and friends and es-pecially Lisa for their support the past 2 years.

Daan Hoevers

(5)

Table of Contents

Abstract ... i

About Supervisors and Author ... ii

Acknowledgements ... iii

Table of Contents ... iv

List of Figures... vi

List of Tables ... vi

List of Python Code ... vii

1 Introduction ... 1

1.1 Context and Background ... 1

1.2 Scope and Objectives ... 2

1.3 Overview of Thesis ... 3

2 Literature Review ... 4

2.1 Forecasting... 4

2.2 Big Data ... 4

2.3 Food Product Forecasting ... 5

3 Data ... 8

3.1 Data Required ... 8

3.2 Data Collection and Preparation ... 9

3.2.1 Sales Data Set ... 9

3.2.2 Weather Data Set ... 9

3.2.3 Building Visitor Data Set ... 10

3.2.4 Time Period Information ... 10

3.3 Data Exploration ... 11 3.3.1 Total Sales ... 11 3.3.2 Product Sales ... 13 3.3.3 Weather ... 14 3.3.4 Building Visitors ... 16 4 Weather Effect ... 17 4.1 Modelling Approach ... 17 4.1.1 Regression Models ... 17 4.1.2 Model Evaluation ... 17 4.1.3 Variables ... 18 4.2 Total Sales ... 18 4.3 Building visitors ... 18 4.4 Restaurant Visitors ... 19

(6)

4.5 Summary ... 19

5 Modelling ... 20

5.1 Modelling Approach ... 20

5.2 Models ... 21

5.2.1 Seasonal Autoregressive Integrated Moving Average ... 21

5.2.2 Quantile Regression ... 22

5.3 Variables ... 22

5.4 Model Evaluation ... 24

5.4.1 Root Mean Squared Error ... 24

5.4.2 Mean Absolute Percentage Error ... 24

5.4.3 Baseline Comparison ... 25

5.5 Modelling... 25

5.5.1 Developing SARIMA Model ... 25

5.5.2 Extending SARIMA ... 27

6 Results and Implications ... 29

6.1 Results ... 29

6.1.1 Forecasting Method Results ... 29

6.1.2 Independent Variable Set Results ... 30

6.1.3 Best MAPE Score ... 31

6.2 Business Implications ... 32

6.2.1 Forecasting Models Applicability ... 33

6.2.2 Recommendation Food Service Company ... 34

6.2.3 Recommendation Building Owner/Tenant ... 35

7 Conclusion ... 37

7.1 Summary ... 37

7.2 Evaluation ... 38

7.3 Discussion ... 40

References ... 42

Appendix 1 – Company Profiles ... 45

Appendix 2 – Data Files ... 46

Appendix 3 – Weather Effect Results ... 50

Appendix 4 – MAPE & RMSE Results ... 52

Appendix 5 – Mathematical Expressions ... 55

(7)

List of Figures

Figure 1 - Demand Influencing Factors Classification ... 8

Figure 2 - Daily Sales (Units) in Restaurant The Edge ... 11

Figure 3 - Top 10 Total Sales Sub Group 1 in Units (left) and Revenue (right) ... 12

Figure 4 - Daily Product Category Sales (Units) Amsterdam ... 13

Figure 5 - Boxplot Daily Product Sales ... 14

Figure 6 - Weather Measurements Amsterdam ... 15

Figure 7 - Daily Building Visitors ... 16

Figure 8 - Modelling Approach ... 20

Figure 9 - Forecast vs True Observations; Sandwich, Salad Buffet & Compound Dishes ... 32

List of Tables

Table 1 - Dependent and Independent Variables Weather Analysis ... 18

Table 2 - Overview of Variables Considered ... 22

Table 3 - Independent Variables Sets ... 23

Table 4 - Augmented Dickey Fuller Test Results ... 26

Table 5 - SARIMA Parameter Search ... 27

Table 6 - Independent Variable Train and Test Sets ... 27

Table 7 – SARIMA Final Parameters ... 29

Table 8 - Forecasting Method Results ... 30

Table 9 - Independent Variable Set Results ... 31

Table 10 - Albron Sales Data Set Table Description ... 46

Table 11 - Albron Product Master Table Description ... 46

Table 12 - Public and School Holidays Netherlands ... 47

Table 13 -The Edge Building Visitor Data Table Description ... 48

Table 14 - Weather Data Table Description ... 48

Table 15 - Estimated coefficients - Total Daily Sales ... 50

Table 16 - Estimated coefficients - Daily Average Number of Visitors Lunch Time ... 50

Table 17 - Estimated coefficients - Total Daily Number of Tickets ... 51

Table 18 - All MAPE & RMSE Results - Sandwich ... 52

Table 19 - All MAPE & RMSE Results - Salad buffet ... 53

(8)

List of Python Code

Python Code 1 - Import Python Packages ... 58

Python Code 2 - Data Preparation ... 58

Python Code 3 - Prepare Building Visitor Data Set ... 64

Python Code 4 - Test Weather Effects ... 67

Python Code 5 - SARIMA Test Products and Building Visitors ... 70

Python Code 6 - Create SARIMA and Regression Model Results ... 73

(9)

1 Introduction

The introduction provides a brief overview of the context and background of this thesis. It shows the bigger picture and relevance of this research. Next, the scope and objectives are dis-cussed which guide the remainder of this thesis.

1.1

Context and Background

Major demographic shifts are increasing and changing global demand for food. The world population is expected to reach 9.5 billion people by 2050, increasing the global food demand by 70% [1]. Majority of this growth will come from developing countries in which also a shift of diets towards more processed foods, meat and dairy is taking place. On the other hand, ac-cording to the Food and Agriculture Organization, roughly one third of the food produced in the world for human consumption every year — approximately 1.3 billion tonnes — gets lost or wasted [2]. The food service industry accounts for 12% of all food waste in the EU

(Stenmarck et al., 2016). During the MBA class Entrepreneurship these trends and insights re-sulted in the business idea of exploring the opportunity to better predict food demand in order to reduce food waste. After careful consideration, it was decided to focus on food service com-pany restaurants. This is a specific niche in the food service industry specializing in offering food services for large corporations, government, universities or other institutions. Often they have multiple year contracts to provide and manage the food service in corporate buildings. During the Entrepreneur class, over ten restaurant managers of company or university restau-rants were interviewed. They currently report a food waste of around 5 to 8%. However, they also expressed they are open to ideas which further reduces the waste. Reducing waste will re-sult in less costs and being conscientious about food waste and offering innovative solutions to counter it is often a criteria when tendering for a contract to provide food services. A first step in reducing waste is not ordering too much because food not ordered cannot be wasted. The importance of this process which includes forecasting and inventory management has been widely recognized by supply chain academics and practitioners. During the interviews with restaurant managers it has been established that on a restaurant level this process is often highly dependent on the professional experience and skills of the restaurant manager. And alt-hough the professional skills are not questioned, the development of forecasting techniques further propelled by Big Data and technological developments provides to an opportunity to explore whether the forecast of demand of products in a company restaurant can be improved.

(10)

1.2

Scope and Objectives

The opportunity to explore whether the forecast of demand of products in a company restau-rant can be improved is translated in the main research question of this thesis:

Can the forecast of product demand in a company restaurant be improved by applying the latest forecast methods and considering different data sources?

This research will explore the following sub-questions in order to answer the main research question:

1. Which forecast methods are used by academic literature in the context of predicting food demand?

2. What are the effects of weather factors on the demand of food products or building visitors?

3. Does the use of the latest forecast models combined with different data sources out-perform simple forecasting methods similar to manual, experience based forecasting? 4. How does the performance of forecasting models differ per products or product

cate-gories?

To answer above questions the company restaurant, building and environment data from The

Edge office building is used. The Edge office building is located in the business district of

Am-sterdam and opened in 2015. The building with a gross floor area of 51,120 m2 can

accommodate approximately 2,000 people. In 2016, The Edge was awarded the BREEAM ((Building Research Establishment Environmental Assessment Method) Award for Offices New Construction and it also won the public vote for the prestigious Your BREEAM Award [3]. The main tenant of the office building is Deloitte, a professional services organization, see appendix 1. Next to Deloitte, lawyer firm AKD, software company Salesforce, high-technol-ogy engineering group Sandvik and chemical and consumer goods company Henkel have offices in The Edge.

The office building restaurant is managed by food services company Albron. They provide the personnel and expertise to offer lunch food products ranging from sandwiches to warm dishes to building visitors during lunch hours. There is also a possibility to have a small warm dish during dinner hours. The restaurant visitors are paying their own lunches. For more infor-mation about Albron, see appendix 1.

(11)

1.3

Overview of Thesis

This thesis is organized as follows. Chapter 2 holds a review of relevant literature on forecast-ing, in particular the recent trends enabled by the Big Data paradigm, and with a focus on comparable food forecasting cases. Chapter 3 discusses the required data and the collection, preparation and exploration of that data. In chapter 4 the weather effect is reviewed in detail. Chapter 5 contains the modelling approach for the prediction model, the results of this ap-proach are discussed in chapter 6. Chapter 7 concludes this thesis with a summary and evaluation of the results.

(12)

2 Literature Review

This chapter summarizes the current literature and research available on forecasting, different forecasting techniques, the impact of the Big Data trend on forecasting and forecasting of food products.

2.1

Forecasting

In order to fulfil customer demand, companies usually keep inventory to compensate for the time difference between the demand and the supply of the goods (Slack et al. 2015). Keeping inventory is costly and hence companies spend significant effort to minimize the amount of effort. Moreover, perishable goods like food can only be stored for a certain amount time. If the good is not consumed before the expiration date, it is wasted. A good demand forecast pro-vides an accurate picture of future demand and helps to avoid overproduction and excessive overstock, which in case of food is wasted if held past the expiration date (Hofmann and Rutschmann, 2018). Forecasting is inherently difficult and situations vary widely in time hori-zons, factors included, types of data patterns, etc., but business who forecast well have a big advantage over those who don’t (Hyndman and Athanasopoulos, 2018).

There are basically two types of forecasting models, qualitative and quantitative models where the latter range from simple to highly complex. Qualitative models, like judgemental forecasts uses expert opinions or other qualitative data to forecast the demand and are often applied when historical data is not sufficient available (Hofmann and Rutschmann, 2018; Hyndman and Athanasopoulos, 2018). Quantitative models uses historical data to find patterns and rela-tionship to forecast future demand. In Forecasting: Principles and Practice, Hyndman and Athanasopoulos (2018) discusses the following quantitative models: regression models, expo-nential smoothing methods, Box-Jenkins Autoregressive Integrated Moving Average

(ARIMA) models, Dynamic regression models, Hierarchical forecasting and several advanced methods including neural networks and vector autoregression. Choosing between these models depends on the data available and the predictability of the quantity to be forecasted. This dis-covery is part of the forecasting process, which according to Hyndman and Athanasopoulos (2018) follows the following basic steps: 1) problem definition, 2) gathering information, 3) preliminary exploratory analysis, 4) choosing and fitting models and 5) using and evaluating forecasting models. These steps are approximately equal to the structure of this thesis.

2.2

Big Data

The term “Big Data” is currently widespread used in several data related contexts. The term spanning computer science and statistics/econometrics originates from conversations at Silicon

(13)

Graphics Inc. in the mid-1990s (Diebold, 2012). In a broader context Big Data is about seeing and understanding the relations within and among pieces of information that, until very re-cently, were hard to grasp due to a lack of data or processing power (Mayer-Schönberger and Cukier, 2013). Big Data can be characterized by the 5Vs of volume, variety, velocity, veracity and value (Nguyen et al. 2018). Volumes refers to the magnitude of the data available. A study by IDC in 2014 indicated that the digital universe, the data created and copied annually, dou-bles in size every two years, and by 2020 it will reach 44 zettabytes, or 44 trillion gigabytes [4]. Variety refers to the heterogenous data sources like sensors in machines and products

(In-ternet of Things), mobile devices and social media and various data format. The speed at

which data is generated and delivered to places where it can be analysed is referred to as ve-locity. Veracity concerns the importance of data quality and trust. Value is the ultimate goal of considering Big Data as it refers to the insights derived from Big Data which improve deci-sion making in a broad sense. Supply chain academics and practitioners show a growing interested in Big Data Analytics (BDA), i.e. the creation of value out of Big Data (Nguyen et al. 2018). The literature review of Nguyen et al. (2018) shows that logistics/transportation take up 28% of the BDA publications, demand management including forecasting, 14%. Nguyen et al. (2018) rightly put these observations based on the time period 2011 and 2018 in perspective by concluding that “the topic of data-driven SCM and data analytics have been studied long over a decade”. Brinch et al. (2018) include not only an academic but also a SCM practitioner view. They conclude that “the hype of Big Data is rather high with many promising research directions, the actual application of Big Data and the current investments indicate a rather slow adoption of Big Data”. The empirical results from Lai et al. (2018) show that perceived benefits and top management support can significantly influence the adoption intention. Brinch et al. (2018), Lai et al. (2018) and Ngyuen et al. (2018) recognize the existence of Big

Data in the 5Vs explained earlier. The perceived benefits and adoption of Big Data Analytics

by SCM practitioners is despite the anticipated and recognized benefits ambiguous. This strengthen the objective of this thesis to explore the possibilities of using different data sources in forecasting demand to support an early proof of potential benefits. The proven benefits help in securing top management support to make further investments in Big Data Analytics and scale the adoption.

2.3

Food Product Forecasting

As indicated to in section 2.1, food is in most cases a perishable product with a limited shelf life. The adds an additional complexity to inventory management as the goods cannot be held for a long time and any excess stock can result in food waste. Kulikovskaja and Aschemann-Witzel (2017) refer to several studies to conclude that “food waste in retail is also caused by

(14)

inaccurate forecasting and overordering”. This emphasizes the need for good forecasting of future demand when food products are involved.

Several studies have assessed the use of forecasting methods involving food products. Lasek et al. (2016) review forecasting techniques used in restaurant sales and customer demand fore-casting. Their summary of forecasting methods used include multiple regression, poisson regression, Box-Jenkins models (AR, AM, ARIMA), exponential smoothing, articifical neural networks, Bayesian network models, hybrid model and association rules and are similar to the techniques discussed by Hyndman and Athanasopoulos (2018). Bozkir and Sezer (2011) used decision tree approaches to predict food consumption in public food courts by including time period and holiday variables. Arunraj and Ahrens (2015) show that a hybrid Seasonal ARIMA and quantile regression model performs best when forecasting daily food sales. Their model include weather data as an independent variable, a data set which can be considered as Big

Data. Bujisic et al. (2017) use solely weather factors to predict restaurant sales and they

con-clude that some have strong influence on sales. Prompted by food waste in Japan, Liue and Ichise (2017) state that “accurate forecasting of food sales can not only in reducing waste but also in optimizing the supply chain system and enhancing efficiency of the whole society. They introduce a long short-term memory (LSTM) network and a stacked denoising autoen-coder network and convert the problem to a classification problem. Their results show that their method outperforms the following traditional machine learning methods: Support Vector Machine, Logistic Regression, Random Decision Forest, Adaptive Boosting and Gradient Boosting Decision Tree. Holmberg and Halldén (2018) uses Extreme Gradient Boosted Trees and Long Short Term Memory Neural Networks to forecast restaurant sales. Among others they included weekdays, holidays and weather factors in their models. The weather effect was not as strong as the authors anticipated, the most important features were the date related fea-tures. Their preferred model is Extreme Gradient Boosted Trees.

Above review shows that Big Data and more advanced forecasting techniques have been ex-plored with in general positive results (Bozkir and Sezer, 2011; Arunraj and Ahrens, 2015; Bujisic et al. ,2017; Liu and Ichise, 2017). Holmberg and Halldén (2018) also show positive results but clearly indicate not as much as anticipated. The forecasting of food products is the common denominator in above articles, but the context and dependent variable are different. Firstly, the context of Bujisic et al. (2017) and Holmberg and Halldén (2018) concerns a res-taurant, where food is prepared and customers usually come irregularly to consume a dinner. Whereas Arunraj and Ahrens (2015) and Liu and Ichise (2017) concern a food retail where food is normally not prepared. The context of Bozkir and Sezer (2011) is very similar to the context of The Edge restaurant since it concerns a university food court. Secondly, the depend-ent variable chosen to predict differs: a category (Lieu and Ichese, 2017), the number of

(15)

persons visiting the food court (Bozkir and Sezer, 2011), sales revenue (Holmberg and Hall-dén, 2018), and individual items (Arunraj and Ahrens, 2015; Bujisic, 2017).

For the purpose of this thesis, the approach of Arunraj and Ahrens (2015) is considered the most promising since it concerns the forecast of an individual item similar to the objective of this thesis. Moreover, they explore a hybrid approach including external variables. Petropoulos et al. (2018) empirically show that forecasting methods based on combinations have the best results in terms of inventory control objectives, whereas Lasek et al. (2016) conclude that models that include external factors are the best. Part of the approach of Arunraj and Ahrens (2015) is determining the most appropriate method, which is in line with Hyndman and Atha-nasopoulos (2018) who state that the choice of the model is dependent on the availability of the data and the predictability of the quantity to be forecasted.

(16)

3 Data

This section outlines the data requirements based on literature and subsequently the collection, preparation and exploration of the data.

3.1

Data Required

The dependent variable under investigation is the demand of food products in the restaurant of

The Edge. In further sections, this variable is discussed in more detail.

The independent variables which reflect the customer behaviour and influence the demand for the dependent variable are called the demand influencing factors. Arunraj and Ahrens (2015) classifies the demand influencing factors into events, weather, seasonality, price, substitution, product characteristics, and number of customer visits. Price and product characteristics are internal factors, while the others are (partially) external, hence not controllable. Of these fac-tors, substitutions, product characteristics and customer visitors were not taking into account due to a lack of data.

As stressed before, data availability is an important qualifier whether to take into account a de-mand factor. A careful investigation learned that the following dede-mand factor categories, see Figure 1, can be included for this research: time period information, i.e. events and seasonality, weather and building visitor information.

Arunraj and Ahrens (2015) include one year of data in their study, whereas Bozkir and Sezer (2011), include two years, Holmberg and Halldén (2018) approximately four years, Bujisic et al. (2017) almost one year and Liu and Ichise (2017) two years. Only Bozkir and Sezer (2011) report that a data set with more time periods could lead to more accurate results. Given these findings, a need to sufficiently capture seasonal effects while having a manageable data set,

(17)

lead to the collecting of the dependent variable, i.e. product sales, and demand influencing fac-tors data for a period from 4 January 2016 up and till 28 May 2018, approximately 2.5 years.

3.2

Data Collection and Preparation

This sections explains the collection of the different data sets for the aforementioned time pe-riod from different sources and its preparation.

3.2.1 Sales Data Set

Albron provided the data set regarding the sales at The Edge restaurant location for the afore-mentioned period. The point of sales data set contains the registration of the product, the units sold and the revenue of each transaction between Albron and a restaurant visitor for the afore-mentioned period in Amsterdam, Utrecht, Den Haag and Rotterdam. The file of 286 MB containing 3,937,368 rows and 7 columns was shared in a csv file format using a common file sharing system between Albron and Deloitte. Albron provided also a product master table con-taining the product names and descriptions of the products sold and a four layer category structure they use to categorize its products. See appendix 2 for more details about the content of these files.

For use in this research, the sales data file was merged with the product master file so for each sales transaction, the product name, description and related categories were known. Further-more, a subset was created for the restaurant location subject in this research, Amsterdam. To obtain the daily sales of a certain product in Amsterdam, the number of sales was aggregated per product per day. Since only sales days were registered when the sales was more than zero, i.e. days that the restaurant was closed, like public holiday days, were not included. This re-sulted in gaps in the days which was resolved by adding these days back to the data set and filling the missing values using linear interpolating (Arunraj and Ahrens, 2015).

3.2.2 Weather Data Set

The weather data is obtained from the Dutch national weather service, the Royal Netherlands Meteorological Institute (KNMI) [5]. The weather station is located approximately 5.88 km from the Amsterdam restaurant location. A download is made for the hourly registration for the time period between 09:00 to 13:00 Universal Time. This reflects the time period of 10:00 to 13:30 in Central European Time and 11:00 – 15:00 in Central European Summer Time, which is approximately equal to the opening hours of the restaurant from 11:00 to 13:30. The result-ing data file contains 14,112 observations with each 22 measurements includresult-ing temperature,

(18)

wind speed and rain. See appendix 2 for a more detailed description of the weather data ob-tained.

From the weather measurements, only the temperature in 0.1 degree Celsius, the wind speed in 0.1 m/s and the hourly sum of the rain in 0.1 mm are considered for this research. Since the data is provided for four hours per day, the data was aggregated by taking the average of the four observations as the daily value for each of the three measurements. The rain measurement is -1 when the rain fall was less than 0.05 mm, this is corrected by replacing -1 by 0.

3.2.3 Building Visitor Data Set

Each visitor of The Edge building in Amsterdam uses a badge to enter the building. Access to floors and certain rooms is also controlled by a badge system. The information from the read-ers is collected in a database. The database contains three months of reader information. At the end of each month, the data of the oldest month is archived on a storage location in separate files. In order to obtain all the information from the period January 2016 to May 2018, Deloitte IT services re-loaded the archived files for that period into the database system and thereafter made an export for every week. In the export the name of the badge holder was re-moved in order to comply with General Data Protection Regulation (GDPR) guidelines [6]. Deloitte IT services finally delivered 135 files with a combined size of 584 MB and in total 17,256,442 rows. Each file contains a record for each badge event for all office locations over-seen by Deloitte IT services. Badge events can be a successfully access or a failed attempt for a reader providing access to the building or access to a floor within the building. See appendix 2 for more information about the visitor data.

A custom python program, see appendix 6, was written to read the weekly data files, select only the events associated with readers related to building entry or exit ports of The Edge. Each event was mapped to 1 for a person entering the building and -1 for a person exiting the building. Next, the number of persons at a certain time present inside The Edge building can be determined by taking the sum of the persons entering and exiting the building between 00:00 and the specific time, assuming that the building is empty at midnight. For this purpose of this research the number of persons at 10:00 and 13:30 is determined. The average of these two observation is the average number of visitors present in The Edge during the restaurant opening hours.

3.2.4 Time Period Information

Time period information can split into seasonality factors and event factors (see Figure 1). For the purpose of this research the weekday and months have been added to the dataset. In line

(19)

with Arunraj and Ahrens (2015), the data set was enriched with event factors in the form of public holidays, day before or after a public holiday and school holidays for period January 2016 till May 2018. The public holidays are mandatory days off for all employees in the Neth-erlands and hence the restaurant was closed. The NethNeth-erlands uses a staggered system for certain school holidays, e.g. the six week summer holiday starts at different dates for the Southern, middle and Northern parts of the Netherlands. Although Amsterdam is officially part of the middle part of the Netherlands, visitors of the building are from all parts of the country. Hence for the staggered holidays, the earliest start date and the latest end date is considered. For a more detailed overview of the public holidays and school holidays considered see appen-dix 2.

3.3

Data Exploration

The exploration of the data collected and prepared is described in this this section. First, the sales data, i.e. the dependent variable, will be explored followed by the independent variables weather and building visitors.

3.3.1 Total Sales

Figure 2 shows the total daily sales of food products in quantities of the Amsterdam restaurant lo-cation after linear interpolation of missing values. The figure also includes the upper and lower bounds of the sales data, any observations outside these bounds are considered outliers. The graph shows there are no upper bound outliers, but approximately ten lower bound outli-ers. These are mainly due to days directly before or after holidays, confirming the inclusion of this independent variable. The figure shows a clear seasonal fluctuation, i.e. “the time series is affected by seasonal factors such as the time of the year or the day of the week” (Hyndman

(20)

and Athanasopoulos, 2018): around July and August of 2016 and 2017 the daily sales drops, while it reaches peaks before and after the Christmas break end of December. No clear trend, i.e. “long-term increase or decrease in the data” (Hyndman and Athanasopoulos, 2018) nor a cycle, i.e. “the data exhibit rises and falls that are not of a fixed frequency” (Hyndman and Athanasopoulos, 2018), are visible. Although it can be argued whether sufficient data is availa-ble to detect a trend. Furthermore, the data shows variability in that the sales in units can rise or drop significantly in a short period. This variability can be attributed to the large number of individual products of which the total sales consists of.

Figure 3 shows the top 10 of total sales of sub group 1 category in the period January 2016 till May 2018 in Amsterdam. From the left bar plot it is evident that the sub group 1 category ‘Bo-terham’, i.e. slice of bread, is the most sold product sub group 1. This sub group 1 consists of the products slice of bread, and slice of bread self-cut. Furthermore, it shows that the ‘simple’ lunch products like meat products, cheese, butter, and dairy products are sold most. The right bar plot shows that the ‘salade buffet’, i.e. salad buffet is the sub group 1 category that gener-ates the most revenue. Again, the ‘simple’ lunch products are also present in the top 10 of products generating the most revenue.

For above mentioned reasons, further research will focus on products sandwich and salad buf-fet because they are sold most and generate most revenue respectively. Furthermore, the

(21)

‘samengestelde gerechten’, i.e. compounded dishes or dishes, sub group 1 category is also in-cluded because this category generates significant revenue and it consists of a variety of 189 different products like hamburgers, pizza’s, pasta, taco’s etc. It must be noted that not each day, all these products are offered in the company restaurant. Instead each day a subset of these products can be purchased.

3.3.2 Product Sales

The daily product sales in units of each of the chosen products, sandwiches, salad buffet and compound dishes after linear interpolation of the missing values is shown in Figure 4.

The sandwich sales shows a pattern similar to the total sales in the Amsterdam restaurant with a through in sales in the Summer months and peaks in the Fall and Winter months. Also, the

(22)

lower bound outliers seen in the total sales appear to be present in the sandwich sales. The salad buffer sales appears to be less influenced by the Summer throughs and Fall/Winter peaks. Furthermore, the salad buffet sales shows an remarkably drop in the first months of 2016, however no specific reason could be found for this drop. Contrary to the total sales and the sandwich sales, the salad buffet not only shows lower bound outliers but also upper bound outliers. The sales of the compound dishes shows almost no Summer throughs or Fall/Winter peaks, instead it shows a shorter seasonal trend. Also, there are no lower bound outliers, only upper bound outliers.

Figure 5 shows the box plot for the daily sales of the three product categories in scope from Monday to Friday (0 to 4). Saturday and Sunday are not included because the company restau-rant is closed on these days. The mean daily sales is approximately equal across the days for the salad buffet and compound dishes. Sandwich sales shows slightly more variation. Further-more, the spread of daily sales is significant bigger on Fridays for sandwich sales. This clear distinction between Friday and the remainder of the days is not shown for salad buffet and the compound dishes. Another observation which was also visible in Figure 4 is that there are only lower bound outliers for sandwich, the salad buffet has upper and lower bound outliers alt-hough more lower than upper, while the compound dishes only has upper bound outliers.

3.3.3 Weather

Figure 6 shows the three weather measurements of the Amsterdam location included in this re-search, average temperature and wind speed and sum of the hourly rain fall for the four hour

(23)

time period from 09:00 to 13:00 Universisal Time from January 2016 till May 2018 after lin-ear interpolation.

The top graph in Figure 6 shows the temperature measurement. It clearly shows the expected seasonal fluctuations with temperatures close or below zero degree Celcius in the Winter peri-ods while mid-twenties degree Celcius in the Summer period. End of January 2016, May 2016, April 2017, and March 2018 show temperatures significantly below or above the ex-pected temperatures.

The wind speed is shown in the middle graph in Figure 6. It does not show clear seasonal fluc-tuations like the temperature. It shows that the wind speed fluctuates between approximately 2.5 m/s and 8.0 m/s, with more than 10 observations above the upper bound, while none be-low.

(24)

The bottom graph in Figure 6 presents the sum of the hourly rain for the four hours time pe-riod under consideration which is obvisously non-negative. It shows from the graph that there a significant observations with peak rain fall, with five measurements above 1.5 millimeter. In 2016, peaks occurred in January, June, in 2017 in March and September and in 2018 in Janu-ary and April. In the other periods, rain fall was between zero and 1.0 millimeters. It shows that there is no clear seasonal fluctuation like temperature.

3.3.4 Building Visitors

Figure 7 shows the daily building visitors of The Edge building in Amsterdam after linear in-terpolation between 10:00 and 13:30 Central European Time. The days that the number of building visitors are zero or close to zero coincide with public holidays like Easter, Christmas and New Year’s Day. Furthemore, significant drops can be observed in July and August. Con-trary to the sales or weather data sets, the building visitors data set shows a slight increase in the building visitors over time, i.e. a trend (Hyndman and Athanasopoulos, 2018). In Septem-ber 2017 a clear peak shows, far above the upper bound. No clear reason has been found for the existence of this peak.

(25)

4 Weather Effect

Before modelling the prediction models, an assessment is done on the effect of the weather variables on total daily sales in number of products, the average number of visitors during the lunch hours 10:00 and 13:30 and the number of paying restaurant customers by the proxy of the number of daily tickets. Buijisci et al. (2017) showed that for their data set and context, weather factors have a strong influence on total sales and specific menu items.

4.1

Modelling Approach

This section elaborates on the modelling approach to assess the weather effect. The modelling itself is done using Python and several Python statsmodels packages are used, see References for more information. When applicable a reference is made to the package that is used.

4.1.1 Regression Models

To assess the weather effect on the specified dependent variables two variants of multiple re-gression models are used which extends the single variable linear rere-gression model to allow for multiple regressors to be included (Stock and Watson, 2015). The first multiple regression model uses the ordinary least squares (OLS) estimator to estimate the regression coefficients of the regression line. This estimator minimizes the sum of the mean squared error between the prediction and the true value of the dependent variable. The second, a Generalized Linear Model (GLM), uses a generalization of OLS regression, “employing a weighted least squares algorithm that iteratively solves for parameter estimates and standard errors” (Hible, 2011). From the key features implementation choices mentioned by Hilbe (2011), the Gamma expo-nential family probability function is used in combination with a log-transform link function.

4.1.2 Model Evaluation

Regression models are evaluated by measuring how well the estimated regression line de-scribes, or fits, the data (Stock and Watson, 2015). A common method used with OLS regression is the adjusted R2. The R2 is the fraction of the sample variance of the dependent

variable explained by the independent variables. The R2 increases when independent variables

are added and the adjusted R2 corrects for this behaviour. An adjusted R2 of 1 implies a perfect

fit of the regression line to the data (Stock and Watson, 2015). GLM models are evaluated us-ing the Pearson Chi2, χ2, lower values indicate a better fit (Hilbe, 2011).

(26)

4.1.3 Variables

The independent variables considered are temperature, wind, and rain, see Table 1. In addition to investigating the effect of the three individual variables, also the interactions between the independent variables, i.e. the effect on the dependent variable of a change in an independent variable depending on the value of another independent variable (Stock and Watson, 2015) is included. Three interaction terms are created by multiplying the independent variables: tem-perature * wind, wind * rain, and temtem-perature * wind * rain. Hence, two sets of independent variables, one with only the single variables and one with the single variables and the interac-tion terms are considered

Table 1 - Dependent and Independent Variables Weather Analysis

Name of variable Unit

Dependent variable

1) Total daily sales Number of products 2) Daily average number of visitors during lunch hours Persons

3) Daily number of tickets Number of tickets

Independent variables

Temperature 0.1 degree ℃

Wind 0.1 m/s

Rain 0.1 mm

4.2

Total Sales

The results of applying the OLS [11] and GLM [12] models on both set of variables are sum-marized in Table 15, appendix 3. The OLS regressions show low Adjusted R2 values,

repetitively 0.190 and 0.196 for the test using the single variables and the combination of sin-gle variables and interaction terms, indicating poor prediction performance of the dependent variable. The results however show that the temperature variable in all four tests is statistically significant on a 1% level. The wind and rain variable are statistically significant on a 5% level but only when using the single variables. Only the interaction term temperature * wind * rain is statistically significant, on a 5% level. Hence it can be concluded that the prediction power of the weather variables on total sales is low, although in certain test they are statistically sig-nificant related.

4.3

Building visitors

The dependent variable building visitors contain a couple of negative values. The average number of persons present in The Edge is calculated by assuming that at 00:00 there are no

(27)

persons inside. If this assumption is violated, the calculation to average the number of persons can return negative values. Hence, before applying the OLS and GLM models, the observa-tions related to a zero or negative values are removed.

The results of applying the OLS and GLM models on each variable set to assess the weather effect on building visitors are summarized in Table 16, appendix 3. The adjusted R2 close to 0

shows that the weather factors have no prediction power of the average number of visitors in-side the building during lunch time. Moreover, apart of the wind variable in the GLM – Gamma none of the variables in any of the tests appear to be statistically significant.

4.4

Restaurant Visitors

The results of applying the OLS and GLM models on both set of variables to assess the weather effect on (paying) restaurant customers via the proxy of number of tickets are summa-rized in Table 17, appendix 3. The adjusted R2 values are in the same range as the OLS tests

done for the effect on number of products sold. The independent variable temperature appears to be statistically significant on 1% significance level in all models, while the wind on a 5% significance level for the single variable only models. Moreover, in the GLM model, the coef-ficients have a close to zero value, i.e. a small effect. It also shows that the interaction terms are in most cases not statistically significant, hence not of value.

4.5

Summary

The weather effect has been tested on total sales in The Edge restaurant, daily visitors in The

Edge building and The Edge restaurant visitors. The weather factors included do not hold any

prediction power for these dependent variables as shown by the low R2 scores. This in contrast

with the results reported by Bujisic et al. (2017) who only test the weather effects on restaurant sales. A potential reason for the difference is that The Edge building is first and foremost an office building where people visit regardless of weather. Moreover, there is a great likelihood that the visitors will use The Edge restaurant because it is convenient regardless of the weather.

(28)

5 Modelling

5.1

Modelling Approach

The literature review discussed some relevant studies with promising results for forecasting food sales. Especially the case presented by Arunraj and Ahrens (2015) is interested because of the case characteristics and results. The case concerns the forecast of daily sales of a food product (bananas) at one retail store in Germany, which is similar to the case presented here, which also concerns the forecasting of single products at one location. Furthermore, their re-sults show that methods used outperform the baseline forecast. Therefore, it is decided to take their approach as the base modelling approach for this thesis.

The modelling approach used by Arunraj and Ahrens (2015) can be described as a hybrid ap-proach because it expands a times series forecasting method with regression methods. For this research their approach is adjusted to fit the purpose of this thesis and summarized in Figure 8.

In step 1a, a Seasonal Autoregressive Integrated Moving Average (SARIMA) model is used to predict an output variable based on its own previous values for a training set of the data. Next,

1 a. Apply SARIMA

Training set daily product sales (de pe nde nt va riable)

P redicted daily sales product 2 . Train re g ression mo de l Te st set independent variables Training set independent variables 3 . Apply traine d re g ression mo del 4 . Calculate RMSE / M APE P redicted daily product sales

Test set daily product sales

RMSE / MAP E

1 b. Apply SARIMA (o ptional)

Training set daily visitors

P redicted daily visitors

Only w hen Pr edic t Vis itor s ar e par t of the independent var iables

s et

(29)

the predicted values are used as an independent variable together with other independent varia-bles to train a regression model, either Ordinary Least Squares (OLS), Generalized Linear Models (GLM) – Gamma or Quantile Regression (QR) (step 2). The trained regression model is applied to the test set of the independent variables (step 3) of the data and these results are used to calculate the metrices (step 4) which are used to evaluate the model. Optionally the SARIMA predicted values of the visitor data (step 1b) are included in the test set for applying the trained regression model. These considerations as well as an explanation of the different models and variables are elaborated on in the remainder of chapter 5.

5.2

Models

The modelling approach uses SARIMA as the time series prediction model. The SARIMA is extend by using several implementations of linear regressions models: Ordinary Least Squares (OLS) and Generalized Linear Models (GLM), described in section 4.1, and Quantile Regres-sion, explained below.

5.2.1 Seasonal Autoregressive Integrated Moving Average

The Autoregressive Integrated Moving Average model, developed by Box et al. (2008) is a widely used technique to predict time series which is constructed based on three components (Brownlee, 2018): 1) Autoregression, using the dependent relationship between an observation and some number of lagged observations, 2) Integrated, using the difference of observations in order to make the time series stationary and 3) Moving Average, using the dependency be-tween an observation and residual errors from a moving average model applied to lagged observations. By including seasonal autoregressive, moving average and differencing opera-tors, the ARIMA model can be extended to a Seasonal ARIMA, i.e. SARIMA, model. The SARIMA is modelled as using (p, d, q)(P, D, Q)S (Arunraj and Ahrens, 2015): where p is the

number of lag observations included in the model; d is the number of times the raw observa-tions are differenced; q is the size of the move average window. P, D, Q, refer to the same parameters but now for the seasonal effect where S is the seasonal length. Applying a SARIMA model consists of three iterative steps: 1) identification of the aforementioned pa-rameters, 2) applying the chosen model to a training test, 3) evaluation of the model results. In step 1, the identification of the parameters, different combination of (p, d, q)(P, D, Q)S

pa-rameters are evaluated using the Akaike Information Criterion (AIC) tool, one of the most widely used selection tools. The AIC tool considers both the model estimation and selection and “models that provide a desirable balance between fidelity to the data and parsimony should correspond to small AIC values” (Cavanaugh and Neath, 2011). So, when evaluating

(30)

different combinations of parameters for the SARIMA models, the model with the lowest AIC is preferred.

5.2.2 Quantile Regression

Arunraj and Ahrens (2015) introduce the extension of SARIMA with Quantile Regression. Koenker and Hallock (2011) describe quantile regression as “an extension of classical least squares estimation of conditional mean models to the estimation of an ensemble of models for several conditional quantile functions. The central special case is the median regression esti-mator which minimizes a sum of absolute errors. Other conditional quantile functions are estimated by minimizing an asymmetrically weighted sum of absolute errors.”

A quantile regression model results in several estimators using quantiles between 0 and 1. Tay-lor (2007) summarizes previous research on combining quantile regression estimators into a robust estimator of the central location of a distribution. This resulted in three estimators be-sides the median regression estimator: trimean, Gastwirth and five-quantile which are all considered in this research, see appendix 5 for the expression of these estimators.

5.3

Variables

The variables considered in the analysis are listed in Table 2. The dependent variable is the daily sales of a product or product group. As outlined in section 3.3, for the purpose of this thesis, sandwiches, salad buffet and the compound dishes are considered. The independent var-iables included are derived based on description in section 3.1 and the availability of the data.

Table 2 - Overview of Variables Considered

Name of variable Unit Category

Dependent variable

Daily sales of product x Each

Independent variables

Predicted daily product x sales (using SARIMA) Number SARIMA predic-tions

Daily visitors Edge building Number Temperature 0.1 degree ℃ Weather Wind 0.1 m/s Rain 0.1 mm Public holiday 1 or 0 Holiday Day before or after public holiday 1 or 0

School holiday 1 or 0

January 1 or 0

Months

(31)

March 1 or 0 April 1 or 0 May 1 or 0 June 1 or 0 July 1 or 0 August 1 or 0 September 1 or 0 October 1 or 0 November 1 or 0 December 1 or 0 Monday 1 or 0 Weekdays Tuesday 1 or 0 Wednesday 1 or 0 Thursday 1 or 0 Friday 1 or 0

Not all variables are used in every evaluation of the models, instead independent variable sets are created. The independent variables SARIMA predicted daily product sales, the weather and holiday variables are included in every evaluation. However, in order to assess the usabil-ity of the months and weekday variables, combinations are made. The same applies for the daily building visitors of The Edge. Due to reservations about the usefulness as well as the quality of the visitor data, it is decided to review different options of using the daily visitor data: 1) not using the daily visitors in the model, 2) including the true daily average between 10:00 and 13:30, i.e. lunch time, 3) true daily visitors at 10:00, 4) predicted daily average visi-tors between 10:00 and 13:30 (using SARIMA). The implications of these options are

discussed further in the business implication section. Arunraj and Ahrens (2015) only uses the months in their regression model because weekday effects are to be covered by the seasonal AR and MA parameters. The current analysis will assess whether that conclusion is true for the current data set as well by considering months only, weekdays only and a combination of months and weekdays in the independent variables sets. Table 3 summarizes the twelve inde-pendent variable sets which are used in the regression step of aforementioned approach. The sets 9 to 12 i.e. Months and Weekdays, will not be used for the QR model.

Table 3 - Independent Variables Sets Excluding daily visitors

True daily aver-age visitors between 10:00 and 13:30

True daily visi-tors at 10:00

Predicted daily average visitors between 10:00

(32)

and 13:30 (using SARIMA) Months only Set 1 Set 2 Set 3 Set 4

Weekdays only Set 5 Set 6 Set 7 Set 8

Months and weekdays Set 9 Set 10 Set 11 Set 12

5.4

Model Evaluation

A common practice in developing models to predict values is to train the model on a certain subset of the available data and evaluate it on the remaining subset of the available data, the test set. When a model is too closely fit to the training set data, it will probably focus to much on individual data points in the training set and will not generalize well on new data, which is the purpose of the model. Hence the goal of modelling is to find a model that provides the best generalization performance (Müller and Guido, 2017).

The different models trained using the training data of the different independent variable sets are evaluated on the test data of the different sets using two common forecasting error

measures which were also applied by Arunraj and Ahrens (2015) and Ramos et al. (2015): the Root Mean Squared Error (RMSE) and the Mean Absolute Percentage Error (MAPE). Further-more, the a baseline comparison using above forecast error measures is done using a Seasonal Naïve Forecasting (SNF) model, similar to Arunraj and Ahrens (2015).

5.4.1 Root Mean Squared Error

The RMSE is the square root of the sum of the mean squared errors between prediction and the true value of the dependent variable. It is a measure of the size of the forecast error (Stock and Watson, 2015). The RMSE is sensitive to occasional large errors due to the squaring pro-cess and there is no good value for a RMSE score, as it is measured in the units of the dependent variable (Ramos et al. 2015).

5.4.2 Mean Absolute Percentage Error

The MAPE is a commonly used percentage error measure for forecasting and is the average of the sum of the absolute value of the different between the prediction and the true value of the dependent variable divided by the true value multiple by 100 (Hyndman, 2011). A MAPE value of close to 0 implies a perfect prediction.

(33)

5.4.3 Baseline Comparison

As described in the section 1.1, the restaurant manager of the restaurant location currently uses his experience to order products. The restaurant manager nor central departments use a formal forecasting method for the restaurant products, let alone a longer horizon forecast is created. In order to derive a baseline model and related performance, a Seasonal Naïve Forecasting (SNF) method similar to Arunraj and Ahrens (2015) is used. The SNF model used forecasts the daily demand based on the previous week sales of the same day. Using the predicted values of this model, the RMSE and MAPE are determined which serve as a benchmark for the RMSE and MAPE generated using the different models and independent variable sets.

5.5

Modelling

After the data pre-processing, the data is split into a 70% training set and 30% test set. The training set concerns the first 70% of the time series data, from 4 January 2016 till 6 June 2017. The test set contains the dates from 7 June 2017 till 28 May 2018, which conveniently covers approximately a full year with all its seasonality fluctuations.

5.5.1 Developing SARIMA Model

A SARIMA model is developed for the three products included and for the visitors. The latter model is used to generate SARIMA predicted values for the building visitors to be included in variable set 4, 8, 12, see section 5.3 Variables.

Firstly, to detect whether the time series data of the products included, i.e. sandwiches, salad buffet and compound dishes, have a stochastic trend and are not nonstationary, an Augmented Dickey Fuller (ADF) test is applied to the training set. A trend is defined as a “persistent long-term movement of a variable over time” (Stock and Watson, 2015). There can be two types of trends, deterministic and stochastic. The first is a non-random function of time, while the latter is random and varies over time. (Stock and Watson, 2015). A timeseries is stationary if the probability distribution does not change over time (Stock and Watson, 2015). The ADF tests for a stochastic trend using one or more lags of the timeseries. If the results of the ADF test is less than the critical values of the ADF statistic, the hypothesis that the time series has a sto-chastic trend can be rejected, against the alternative that it is stationary around a linear trend. If the hypothesis can be rejected, the times series is stationary and no solutions have to be imple-mented to overcome nonstationarity (Stock and Watson, 2015).

The Augmented Dickey Fuller [13] results for the three included products and building visitor time series are shown in Table 4. For the products sandwich, compound dishes and building

(34)

visitors, the ADF test statistic is more negative than the critical value ADF statistic at 1% sig-nificance level, while for the salad buffet more negative than the critical value ADF statistic at 5% significance level. Hence the null hypothesis that the time series of these products have a stochastic trends is rejected at a 1% significance level for sandwich, compound dishes and vis-itors and at a 5% significance level for salad buffet, so the time series are stationary. This implies no solutions have to implemented to overcome nonstationarity

Table 4 - Augmented Dickey Fuller Test Results

Sandwich Salad buffet Compound dishes

Visitors ADF test statistic -4.102 -3.334 -12.253 -6.218

p-value 0.001 0.013 0.000 0.000

Number of lags used 8 4 1 7

Number of obs. Used 429 433 436 618

Critical value (1%) -3.445

Critical value (5%) -2.868

Critical value (10%) -2.570

As outlined in section 5.2.1, different combinations of (p, d, q)(P, D, Q)S parameters are

evalu-ated using the Akaike Information Criterion (AIC) tool, one of the most widely used selection tools. Since there are seven parameters involved in a SARIMA model, the number of combina-tions are potentially infinite, hence a starting point combination is chosen randomly and from there a number of combinations are tested using the Python’s SARIMA package [14]. Since it was concluded that neither the product data nor the visitor data are stationarity, the enforce sta-tionarity parameter was set to false as is the enforce invertibility parameter. In order to reduce the total time of the parameter search, the maximum number of iterations is set to 60 and the simple differencing parameter is set to true which implies that differencing is performed prior to estimation, which discards the first initial rows but results in a smaller state-space formula-tion.

Besides the AIC, fitting time is also used to evaluated the model because it proved to be signif-icant, i.e. over 30 minutes, for higher values of p, d, q, P, D, Q and S. Table 5 summarizes the best performing parameters based on the average of AIC and fitting time for the three products included as well as the visitors data. If the fitting time is long, the actually model fitting will also take long and the program potentially runs out of memory.

(35)

Table 5 - SARIMA Parameter Search

Sandwich Salad buffet Compound dishes Building Visi-tors Order (p, d, q) (0, 0, 0) (0, 0, 0) (0, 0, 0) (0, 0, 0) Seasonal order (P, D, Q, S) (5, 3, 0, 52) (5, 3, 0, 52) (5, 3, 0, 52) (5, 3, 0, 52) AIC 302.02 270.09 257.09 3252.01

Training time (seconds) 26.36 s 27.44 s 29.29 s 108.81 s

From Table 5 it can be concluded that for each product as well as the building visitors the same SARIMA parameter combination show the best AIC result. Another observation is that the fitting time is significant smaller for the products than for the visitors data set.

5.5.2 Extending SARIMA

As outlined in section 5.1, the next step is to use the prediction values of the SARIMA model with the best parameter combination and apply them to the various variables sets explained in section 5.3 Variables. For the products, this implies that in the training set which are used in the regression models, the SARIMA predicted values are included in all independent variable sets. The visitor time series is treated differently in the independent variable sets, i.e. no visi-tors, true average lunch visivisi-tors, true visitors at 10:00 and predict average lunch visitors. In the last case, the training set includes the true average lunch visitors, while the test includes the predicted average lunch visitors.

To summarize, the training set data sets containing 70% of the time series data is enriched with the SARIME predicted product values resulting in nine independent variables sets. The test set containing 30% of the time series data is enriched with the SARIMA predicted product values and for the predicted daily average visitors, i.e. the right column in Table 6, the SARIMA pre-dicted average building visitors are added. Table 6 summarizes these sets. Note that the simple differencing parameter in the SARIMA model is set to the default value false for the model fit-ting otherwise the number of predicted values is not equal to the test set.

Table 6 - Independent Variable Train and Test Sets Excluding daily visitors

True daily aver-age visitors between 10:00 and 13:30

True daily visi-tors at 10:00 Predicted daily average visitors between 10:00 and 13:30 (using SARIMA) Months only x_m_nv_train

x_m_nv_test x_m_tva_train x_m_tva_test x_m_tvt_train x_m_ tvt _test x_m_tva_train x_m_pva_test

(36)

Weekdays only x_w_nv_train x_w_nv_test x_w_tva_train x_w_tva_test x_w_ tvt _train x_w_ tvt _test x_w_tva_train x_w_pva_test

Months and weekdays x_mw_nv_train

x_mw_nv_test x_mw_tva_train x_mw_tva_test x_mw_ tvt _train x_mw_ tvt _test x_mw_tva_train x_mw_pva_test Abbreviations:

m: month; w: week, mw: month and week

nv: no visitors; tva: true visitors average; tvt: true visitors 10:00; pva: predicted average visitors

Subsequently, above mentioned training sets are used to train a model using Python implemen-tation of the OLS [11], GLM-Gamma [12] and QR [14] models. For the QR models, different quantile models are trained in order to obtain all the quantile results to create the median, tri-mean, Gastwirth and five-quantile estimators (Arunraj and Ahrens, 2015; Taylor, 2007). This implies using the quantiles: 0.1, 0.25, 1/3, 0.5, 2/3, 0.75 and 0.9. See appendix 5 for the mathe-matical expressions. The combination of the three different models and twelve independent variable sets resulted in training twelve models for OLS and GLM-Gamma each and seven, the quantiles, times eight, only months and weekdays only set, is 56 QR models. So in total 80 models were trained.

The trained models are applied to the test sets to obtain the forecast for of each product. Using the predicted values, the RMSE and MAPE are calculated. Section 6 will show and elaborate on the results.

(37)

6 Results and Implications

This chapter will summarize the results and its business implications for Albron, managing the company restaurant, and Deloitte as main tenant of The Edge building.

6.1

Results

The SARIMA models were deployed using the parameters outlined in Table 5. However, in the process of applying the models two observations were made. Firstly the best performing parameter set for the visitors data run into a low memory error when it was applied. Hence it was decided to use a (1, 1, 1)(1, 2, 1, 52) parameter set which has a lower training time. How-ever, the AIC of this model is more than twice the AIC of the preferred parameter set: 6919.58. Secondly, the SARIMA models with the preferred parameter combination applied to the prod-uct time series data resulted in lower MAPE scores for all three prodprod-ucts than an alternative of (2, 1, 1)(5, 2, 0, 52). Surprisingly, the AIC of this combination are higher than the AIC of the preferred parameter combinations. It is decided to use this parameters set. The final SARIMA parameters used are summarized in Table 7.

Table 7 – SARIMA Final Parameters

Sandwich Salad buffet Compound dishes Building Visi-tors Order (p, d, q) (2, 1, 1) (2, 1, 1) (2, 1, 1) (1, 1, 1) Seasonal order (P, D, Q)S (5, 2, 0, 52) (5, 2, 0, 52) (5, 2, 0, 52) (1, 2, 1, 52) AIC 889.98 774.06 774.07 6919.58

Training time (seconds) 354.92 s 622.45 s 407.98 s 120.70 s

The forecast accuracy measure MAPE is considered the primary measure for this research. Therefore, the results section shows per product the best, i.e. smallest MAPE score of each of the different regression models for which is the SARIMA is extended, i.e. OLS, GLM-Gamma and QR. These results are compared with the baseline Seasonal Naïve Forecasting result for the product. In addition, the best MAPE score for each of the seven independent variable set drivers are shown. Furthermore the best MAPE results for the independent variable test sets are shown. The best MAPE result overall is shown graphically.

6.1.1 Forecasting Method Results

Table 8 summarizes the best MAPE score for each model and each product. In selecting the best MAPE scores, the scores of the independent variable set using the true average lunch visi-tors (tva) are excluded because including an independent variable into a forecast which cannot

Referenties

GERELATEERDE DOCUMENTEN

1999). For instance this information could be based on the scarcity principle where opportunities seem more valuable to us when they are less available or might be

The capacity planning model, with the right planning horizon, is a powerful tool, which provides insights in the behavior of demand, capacity, and inventory which can assist WPV

• Prepaid Account – you will make a prepayment to your account during registration, so that the account will be debited on an ongoing basis for driving on toll roads. •

To solve this problem, Chandler Innovations has put in place a free program with Americans to immerse and train you in American methods while living in Chandler.. This program

an average transfer percentage of all flights departing from Schiphol Airport of at least 10%, measured over the five calendar years preceding publication of the designation;..

5 terrasklaptafels met 10 bijhorende klapstoelen, 4 diverse bartafels, waaronder afmetingen circa: 1x 700 x 1300 xH1000mm en 3x 650 x 650 xH1000mm, voorzien van 10

A solution to the comparability problem: A network based on standardized VAR(1) weights To ensure the comparability of the VAR(1) regression coefficients and thus of the edges, one

Combining the social support service with the on-demand public transport, might increase the revenue, since more requests need service within the relatively small service area.