# Forecasting the Number of Customers Visiting Restaurants Using Machine Learning and Statistical Method

Takashi Tanizaki, Shunsuke Kozuma, Takeshi Shimmura

► To cite this version:

Takashi Tanizaki, Shunsuke Kozuma, Takeshi Shimmura. Forecasting the Number of Customers Visiting Restaurants Using Machine Learning and Statistical Method. IFIP International Conference on Advances in Production Management Systems (APMS), Sep 2021, Nantes, France. pp.189-197, 10.1007/978-3-030-85906-0_21. hal-04022160

HAL Id: hal-04022160

https://inria.hal.science/hal-04022160

Submitted on 9 Mar 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Forecasting the Number of Customers Visiting Restaurants Using Machine Learning and Statistical Method

Takashi Tanizaki<fnref n="1" />, Shunsuke Kozuma<fnref n="1" /> and Takeshi Shimmura<fnref n="2" />

**Abstract.** In this paper, it is proposed the forecasting of the number of customers visiting restaurants using machine learning and statistical method. There are some researches on forecasting the number of customers visiting restaurants. Since the beginning of last year, the number of customers visiting restaurants has plummeted due to COVID-19. A machine learning-based approach can be applied to forecast something including stable trends. Therefore, in this paper, machine learning that incorporates the moving average method is proposed to reflect the latest fluctuation trend. Furthermore, a forecasting method using deep learning is proposed to improve forecasting accuracy. In the method using deep learning, the analysis results on the normalization of training data and the contribution of meteorological data to the forecasting accuracy are described. It was found that the introduction of the moving average into the explanatory variables is effective when the trend of the number of customers visiting fluctuates rapidly. It was also found that normalization for each year of training data is effective when the annual average number of customers visiting restaurants increases or decreases monotonically.

**Keywords:** Forecasting Customers Visiting, Machine Learning, Deep learning.

## 1 Introduction

The GDP of the service industry accounts for more than 70% of that of Japan. The productivity of the service industry is lower than that of the manufacturing industry. In order to improve the productivity of the service industry, it is important to improve "efficiency" and "customer satisfaction and service quality" at the same time by using engineering methods. The goal of our research is to improve a store management method by optimizing employee job arrangements and cooking material orders based on accurate forecasts of the number of customers visiting restaurants. In our research up to last year, we made forecasts using machine learning and statistical method [1][2]. Since the beginning of last year, the number of customers visiting restaurants has

<footnote n="1">¹ Graduate School of Systems Engineering, Kindai University,
1 Takaya-Umenobe, Higashi-Hiroshima, 739-2116, Japan
tanizaki@hiro.kindai.ac.jp</footnote>

<footnote n="2">² Ritsumeikan University,
1-1-1 Nogi-Higashi, Kusatsu 525-8577, Japan</footnote>
plummeted due to COVID-19. A machine learning-based approach can be applied to forecast something including stable trends. In this paper, machine learning that incorporates the moving average (MA) method is proposed in order to reflect the latest fluctuation trend in the forecast for 2020, when the number of customers visiting the restaurant has dropped sharply affected by the COVID-19. Furthermore, a forecasting method using deep learning is proposed to improve forecasting accuracy. In deep learning, we also analyzed the normalization method of training data and the effect of the presence or absence of meteorological data.

# 2 Forecasting Method

In this paper, "Gradient Boosting Regression (GBR) [3]", "Bayesian Linear Regression (Bayesian) [4]", "Boosted Decision Tree Regression (Boosted) [5]", "Decision Forest Regression (Decision) [6]", "Random Forest Regression (RFR) [7]", and "Stepwise Method [8]" are used as machine learning and statistical method. In addition, "Simple Recurrent Neural Network (RNN)" and "long short-term memory (LSTM)" are used as deep learning methods [9].

# 3 Forecasting the number of customers visiting restaurants

## 3.1 Target data

Using the customers visiting data of four stores from restaurant chain A of the joint research, the number of customers visiting was forecasted. Table 1 shows the period of training data set and test data set. The number of customers visiting restaurants was forecasted by machine learning incorporating the MA method using the training data set for the past four years. In order to compare the forecasting accuracy with and without the influence of COVID-19, we compared the forecasting results using the training dataset from 2018/5/1 to 2019/4/30 and 2019/5/1 to 2020/4/30. In deep learning, two-year, three-year, and four-year training data were used to compare the forecasting accuracy depending on the amount of training data.

<table><caption>Table 1. Training data set and test data set</caption><thead><tr><th>Method</th><th>Data set</th><th>Period</th><th>From</th><th>To</th></tr></thead><tbody><tr><td rowspan="4">Machine learning</td><td rowspan="2">Training data set</td><td>Four years</td><td>2014/5/1</td><td>2018/4/30</td></tr><tr><td>Four years</td><td>2015/5/1</td><td>2019/4/30</td></tr><tr><td rowspan="2">Test data set</td><td>Year 2018</td><td>2018/5/1</td><td>2019/4/30</td></tr><tr><td>Year 2019</td><td>2019/5/1</td><td>2020/4/30</td></tr><tr><td rowspan="4">Deep learning</td><td rowspan="3">Training data set</td><td>Four years</td><td>2014/5/1</td><td>2018/4/30</td></tr><tr><td>Three years</td><td>2015/5/1</td><td>2018/4/30</td></tr><tr><td>Two years</td><td>2016/5/1</td><td>2018/4/30</td></tr><tr><td>Test data set</td><td>Year 2018</td><td>2018/5/1</td><td>2019/4/30</td></tr></tbody></table>
Table 2 shows the explanatory variables used for the forecasting. The meteorological data used was the data from the Japan Meteorological Agency's observation station closest to the location of each store. From our last year's research [10], we obtained the result that meteorological data do not affect the forecasting accuracy in machine learning, thus those data were excluded from explanatory variables. On the other hand, in deep learning, the effect on the forecasting accuracy of the presence or absence of meteorological data was analyzed.

<table><caption>Table 2. Explanatory variable</caption><thead><tr><th>Category</th><th>Explanatory variable</th><th>Definition</th></tr></thead><tbody><tr><td rowspan="12">Month</td><td>January</td><td>Jan/1-Jan/31</td></tr><tr><td>February</td><td>Feb/1-Feb/28</td></tr><tr><td>March</td><td>Mar/1-Mar/31</td></tr><tr><td>April</td><td>Apr/1-Apr/30</td></tr><tr><td>May</td><td>May/1-May/31</td></tr><tr><td>June</td><td>Jun/1-Jun/30</td></tr><tr><td>July</td><td>Jul/1-Jul/31</td></tr><tr><td>August</td><td>Aug/1-Aug/31</td></tr><tr><td>September</td><td>Sep/1-Sep/30</td></tr><tr><td>October</td><td>Oct/1-Oct/31</td></tr><tr><td>November</td><td>Nov/1-Nov/30</td></tr><tr><td>December</td><td>Dec/1-Dec/31</td></tr><tr><td rowspan="12">The day of the week</td><td>Monday</td><td>Weekday and the next day is weekday</td></tr><tr><td>Tuesday</td><td>Weekday and the next day is weekday</td></tr><tr><td>Wednesday</td><td>Weekday and the next day is weekday</td></tr><tr><td>Thursday</td><td>Weekday and the next day is weekday</td></tr><tr><td>Friday</td><td>Weekday and the next day is weekday</td></tr><tr><td>Saturday</td><td>Even if the target day is a holiday it is Saturday.</td></tr><tr><td>Sunday</td><td>Sunday and the next day is weekday</td></tr><tr><td rowspan="2">Sunday during holidays</td><td>Even if the target day is a holiday it is Sunday.</td></tr><tr><td>Sunday and the next day is holiday</td></tr><tr><td>Holiday</td><td>Holiday and the next day is holiday</td></tr><tr><td>Holiday during holidays</td><td>Holiday and the next day is holiday</td></tr><tr><td>Before holiday</td><td>Weekday and the next day is holiday</td></tr><tr><td>Lastday during holidays</td><td>The last day of three or more consecutive holidays</td></tr><tr><td rowspan="6">5 day pitch week</td><td>First week</td><td>1st day - 5th day</td></tr><tr><td>Second week</td><td>6th day - 10th day</td></tr><tr><td>Third week</td><td>11th day - 15th day</td></tr><tr><td>Fourth week</td><td>16th day - 20th day</td></tr><tr><td>Fifth week</td><td>21st day - 25th day</td></tr><tr><td>Sixth week</td><td>26th day - Last of the month</td></tr><tr><td rowspan="12">Event</td><td>January 1st</td><td>January 1st</td></tr><tr><td>January 2nd</td><td>January 2nd</td></tr><tr><td>January 3rd</td><td>January 3rd</td></tr><tr><td>Year-end</td><td>Dec/29-Dec/31</td></tr><tr><td>End of year party</td><td>Weekday of December</td></tr><tr><td>Christmas eve</td><td>December 24th</td></tr><tr><td>Coming-of-age day</td><td>Second Monday in January</td></tr><tr><td>Setsubun</td><td>February 2nd</td></tr><tr><td>Obon</td><td>Aug/13-Aug/15</td></tr><tr><td>New year's party</td><td>Weekday till the coming-of-age day except Jan/1-Jan/3</td></tr><tr><td>Farewell party</td><td>Weekday in March</td></tr><tr><td>Welcome party</td><td>Weekday in April</td></tr><tr><td rowspan="6">Meteorology</td><td>Average wind speed</td><td>Average wind speed per day (m/s)</td></tr><tr><td>Maximum wind speed</td><td>Maximum wind speed per day (m/s)</td></tr><tr><td>Highest temperature</td><td>Highest temperature in a day (°C)</td></tr><tr><td>Lowest temperature</td><td>Lowest temperature in a day (°C)</td></tr><tr><td>Amount of precipitation</td><td>Amount of precipitation in a day (mm)</td></tr><tr><td>Maximum precipitation</td><td>Maximum amount of precipitation in ten minutes (mm)</td></tr><tr><td>Maximum instantaneous wind speed</td><td>Maximum instantaneous wind speed in a day (m/s)</td></tr><tr><td>Moving average</td><td>Simple moving average</td><td>Simple moving average value</td></tr></tbody></table>
The forecasting accuracy $\alpha$, that is a ratio of the number of forecasted customers to that of actual customers, is calculated using the equations (1) and (2). The reasons for excluding reserved customers in equation (1) are as follows. Since many of the reserved customers of restaurant chain A are for business use such as social gatherings associated with business trips, factors related to reserved customers are not included in the explanatory variables.

$p_i$: Actual number of customers visiting without reservation on i-th day

$e_i$: Forecasted number of customers visiting without reservation on i-th day

$\alpha_i$: Forecasting accuracy without reservation on i-th day

$N$: Forecasting period

$$ \alpha_i = \frac{p_i - |p_i - e_i|}{p_i} \qquad (1) $$

$$ \alpha = \frac{\sum_{i=1}^{N} \alpha_i}{N} \qquad (2) $$

## 3.2 Order of MA

The relationship between the order of MA and the forecasting accuracy value was investigated to find the best order of MA. Using visitor data from 2014/5/1 to 2018/4/30, we forecasted the number of visitors visiting the four stores using only MA. In doing so, the order of MA was varied from 2 to 31. Figure 1 shows the forecasting accuracy. There was no significant change in forecasting accuracy for all four stores for 7 or higher of the order of MA. Figures 2 and 3 show the actual number of customers visiting over the four years and the forecasting results when the order of MA is set to 7, 14, 21, and 28 at store A. As the order of MA increased, the forecasting results tended to become smoother. Based on the above, and from the perspective of reflecting the weekly trend the next day, the order of MA was set to 7 in the following research.

<figure><img src="image_3.png" /><figcaption>Fig. 1. Forecasting accuracy using MA</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Fig. 2. Forecasting results and actual result (2014/5 – 2016/4)</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig. 3. Forecasting results and actual result (2016/5 – 2018/4)</figcaption></figure>

## 3.3 Forecasting results of machine learning

Table 3 shows the forecasting accuracy using machine learning. With the MA method, the method with the highest forecasting accuracy in 2018 was different for each store. In 2019, the stepwise method was the highest except for store B. Without the MA method, the forecasting accuracy of the Decision method was the highest in 2018 except for store A. In 2019, the Boosted method was the highest except for store D. Comparing with and without the MA method, the forecasting accuracy was higher with the MA method. This tendency was remarkable in 2019, which was affected by COVID-2019.
<table><caption>**Table 3.** Forecasting accuracy using machine learning
: better result between 'with MA' and 'without MA'</caption><thead><tr><th>Store</th><th>Year</th><th>MA</th><th>GBR</th><th>Bayesian</th><th>Boosted</th><th>Decision</th><th>RFR</th><th>Stepwise</th></tr></thead><tbody><tr><td rowspan="4">A</td><td rowspan="2">2018</td><td>with</td><td>79.10%</td><td>78.27%</td><td>66.08%</td><td>77.12%</td><td>78.39%</td><td>78.89%</td></tr><tr><td>without</td><td>77.86%</td><td>75.67%</td><td>72.16%</td><td>74.57%</td><td>75.67%</td><td>75.83%</td></tr><tr><td rowspan="2">2019</td><td>with</td><td>65.17%</td><td>68.50%</td><td>66.60%</td><td>66.56%</td><td>66.02%</td><td>68.95%</td></tr><tr><td>without</td><td>63.92%</td><td>63.39%</td><td>68.44%</td><td>65.21%</td><td>61.86%</td><td>63.66%</td></tr><tr><td rowspan="4">B</td><td rowspan="2">2018</td><td>with</td><td>76.03%</td><td>76.72%</td><td>74.62%</td><td>76.57%</td><td>74.03%</td><td>76.88%</td></tr><tr><td>without</td><td>74.33%</td><td>73.15%</td><td>74.58%</td><td>76.15%</td><td>71.97%</td><td>72.92%</td></tr><tr><td rowspan="2">2019</td><td>with</td><td>65.78%</td><td>73.76%</td><td>57.06%</td><td>66.47%</td><td>64.40%</td><td>72.96%</td></tr><tr><td>without</td><td>65.28%</td><td>64.86%</td><td>67.11%</td><td>66.46%</td><td>65.47%</td><td>65.20%</td></tr><tr><td rowspan="4">C</td><td rowspan="2">2018</td><td>with</td><td>79.02%</td><td>79.59%</td><td>76.71%</td><td>78.27%</td><td>78.57%</td><td>79.56%</td></tr><tr><td>without</td><td>74.57%</td><td>74.17%</td><td>74.03%</td><td>76.50%</td><td>74.18%</td><td>74.29%</td></tr><tr><td rowspan="2">2019</td><td>with</td><td>66.05%</td><td>67.99%</td><td>63.70%</td><td>64.19%</td><td>65.00%</td><td>68.24%</td></tr><tr><td>without</td><td>57.48%</td><td>57.84%</td><td>65.92%</td><td>64.26%</td><td>58.12%</td><td>57.79%</td></tr><tr><td rowspan="4">D</td><td rowspan="2">2018</td><td>with</td><td>53.00%</td><td>37.27%</td><td>52.77%</td><td>55.03%</td><td>55.21%</td><td>34.04%</td></tr><tr><td>without</td><td>64.62%</td><td>44.40%</td><td>68.89%</td><td>70.05%</td><td>50.10%</td><td>39.22%</td></tr><tr><td rowspan="2">2019</td><td>with</td><td>57.81%</td><td>58.34%</td><td>53.76%</td><td>58.51%</td><td>57.89%</td><td>58.65%</td></tr><tr><td>without</td><td>50.23%</td><td>49.97%</td><td>41.38%</td><td>56.67%</td><td>51.38%</td><td>49.59%</td></tr></tbody></table>

Figure 4 shows the transition in the actual customers visiting values and the forecasting values for the most accurate method in Table 3 for each store. Since January 2020, which was affected by the COVID-2019, the forecasting method with MA was able to follow the sharp decrease in the actual visiting. This is probably because the latest trend information could be reflected in the forecast by MA. However, since the forecast period is short (4 months), consideration will be given based on the forecast results for a longer period.

<table><caption>Actual : Forecasting (with MA) : Forecasting (without MA)</caption><thead><tr><th>Store</th><th>Chart</th><th>Store</th><th>Chart</th></tr></thead><tbody><tr><td>A<br>(Step-wise)</td><td></td><td>B<br>(Bayesian)</td><td></td></tr><tr><td>C<br>(Step-wise)</td><td></td><td>D<br>(Step-wise)</td><td></td></tr></tbody></table>

<caption>**Fig. 4.** Forecasting results using machine learning</caption>
## 3.4 Forecasting results of deep learning

Table 4 compares the accuracy of the forecast using the training data normalized for all years (all years) and the training data normalized for each year (each year). At stores, C and D, the forecasting accuracy of both RNN and LSTM using the training data normalized for each year was higher. On the other hand, at store A, there were many cases where the forecasting accuracy using normalized data for all years was high. At store B, there was no significant tendency. Table 5 shows the average number of customers visiting per day compared to 2014. At stores, C and D, the average number of customers visiting per day has decreased almost monotonically, and 2018, which is the forecast target, has decreased by more than 20% compared to 2014. Furthermore, this is also considered to be the reason why the forecasting accuracy is higher when the training data of the last 2 years is used than the 4 years that the number of training data is more.

<table><caption>**Table 4.** Forecasting accuracy using deep learning comparing normalization</caption><thead><tr><th rowspan="3">Store</th><th rowspan="3">Training data</th><th colspan="4">With meteorological data</th><th colspan="4">Without meteorological data</th></tr><tr><th colspan="2">RNN</th><th colspan="2">LSTM</th><th colspan="2">RNN</th><th colspan="2">LSTM</th></tr><tr><th>All year</th><th>Each year</th><th>All year</th><th>Each year</th><th>All year</th><th>Each year</th><th>All year</th><th>Each year</th></tr></thead><tbody><tr><td rowspan="3">A</td><td>four</td><td>76.90%</td><td>65.77%</td><td>75.20%</td><td>75.18%</td><td>81.05%</td><td>72.58%</td><td>73.90%</td><td>73.84%</td></tr><tr><td>three</td><td>80.67%</td><td>67.52%</td><td>73.00%</td><td>68.31%</td><td>75.40%</td><td>67.65%</td><td>73.90%</td><td>66.26%</td></tr><tr><td>two</td><td>68.96%</td><td>69.41%</td><td>70.95%</td><td>70.55%</td><td>69.10%</td><td>76.14%</td><td>70.11%</td><td>70.96%</td></tr><tr><td rowspan="3">B</td><td>four</td><td>65.99%</td><td>58.28%</td><td>63.73%</td><td>57.48%</td><td>64.10%</td><td>63.75%</td><td>63.52%</td><td>57.73%</td></tr><tr><td>three</td><td>75.16%</td><td>74.44%</td><td>71.81%</td><td>74.44%</td><td>71.50%</td><td>72.48%</td><td>71.68%</td><td>71.76%</td></tr><tr><td>two</td><td>72.04%</td><td>63.27%</td><td>69.86%</td><td>72.25%</td><td>69.22%</td><td>70.63%</td><td>69.03%</td><td>71.36%</td></tr><tr><td rowspan="3">C</td><td>four</td><td>29.95%</td><td>70.24%</td><td>41.81%</td><td>71.39%</td><td>63.44%</td><td>74.27%</td><td>40.34%</td><td>70.20%</td></tr><tr><td>three</td><td>64.77%</td><td>74.43%</td><td>65.69%</td><td>72.95%</td><td>68.21%</td><td>76.47%</td><td>64.44%</td><td>72.36%</td></tr><tr><td>two</td><td>69.86%</td><td>74.65%</td><td>70.57%</td><td>72.33%</td><td>75.04%</td><td>67.77%</td><td>70.40%</td><td>72.53%</td></tr><tr><td rowspan="3">D</td><td>four</td><td>36.17%</td><td>69.25%</td><td>25.52%</td><td>71.54%</td><td>15.89%</td><td>62.73%</td><td>18.89%</td><td>70.71%</td></tr><tr><td>three</td><td>53.57%</td><td>75.94%</td><td>54.53%</td><td>73.33%</td><td>34.50%</td><td>74.66%</td><td>55.05%</td><td>73.06%</td></tr><tr><td>two</td><td>65.24%</td><td>66.21%</td><td>73.02%</td><td>73.87%</td><td>63.89%</td><td>64.99%</td><td>72.98%</td><td>74.28%</td></tr></tbody></table>

<table><caption>**Table 5.** The average number of customers visiting per day</caption><thead><tr><th rowspan="2">Year</th><th colspan="4">Store</th></tr><tr><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr><td>2014</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td></tr><tr><td>2015</td><td>100.7%</td><td>104.9%</td><td>84.9%</td><td>101.5%</td></tr><tr><td>2016</td><td>87.8%</td><td>87.6%</td><td>78.8%</td><td>94.7%</td></tr><tr><td>2017</td><td>89.4%</td><td>84.8%</td><td>76.5%</td><td>86.6%</td></tr><tr><td>2018</td><td>86.5%</td><td>85.8%</td><td>71.6%</td><td>79.5%</td></tr></tbody></table>

Table 6 compares the accuracy of the forecast using the training data including meteorological data (with data) and not (without data). In the forecasting using RNN, the accuracy of the forecasting using the training data with the meteorological data was higher at store D and was lower at stores A and C. At store B, there was no significant tendency. In forecasting using LSTM, the accuracy of the forecasting using the training data with the meteorological data was higher. Since the tendency is different between RNN and LSTM, more detailed analysis and tuning will be performed in the future.
<table><caption>**Table 6.** Forecasting accuracy using deep learning comparing meteorological data</caption><thead><tr><th rowspan="3">Store</th><th rowspan="3">Training data</th><th colspan="4">All year</th><th colspan="4">Each year</th></tr><tr><th colspan="2">RNN</th><th colspan="2">LSTM</th><th colspan="2">RNN</th><th colspan="2">LSTM</th></tr><tr><th>With data</th><th>Without data</th><th>With data</th><th>Without data</th><th>With data</th><th>Without data</th><th>With data</th><th>Without data</th></tr></thead><tbody><tr><td rowspan="3">A</td><td>four</td><td>76.90%</td><td>81.05%</td><td>75.20%</td><td>73.90%</td><td>65.77%</td><td>72.58%</td><td>75.18%</td><td>73.84%</td></tr><tr><td>three</td><td>80.67%</td><td>75.40%</td><td>73.00%</td><td>73.90%</td><td>67.52%</td><td>67.65%</td><td>68.31%</td><td>66.26%</td></tr><tr><td>two</td><td>68.96%</td><td>69.10%</td><td>70.95%</td><td>70.11%</td><td>69.41%</td><td>76.14%</td><td>70.55%</td><td>70.96%</td></tr><tr><td rowspan="3">B</td><td>four</td><td>65.99%</td><td>64.10%</td><td>63.73%</td><td>63.52%</td><td>58.28%</td><td>63.75%</td><td>57.48%</td><td>57.73%</td></tr><tr><td>three</td><td>75.16%</td><td>71.50%</td><td>71.81%</td><td>71.68%</td><td>74.44%</td><td>72.48%</td><td>74.44%</td><td>71.76%</td></tr><tr><td>two</td><td>72.04%</td><td>69.22%</td><td>69.86%</td><td>69.03%</td><td>63.27%</td><td>70.63%</td><td>72.25%</td><td>71.36%</td></tr><tr><td rowspan="3">C</td><td>four</td><td>29.95%</td><td>63.44%</td><td>41.81%</td><td>40.34%</td><td>70.24%</td><td>74.27%</td><td>71.39%</td><td>70.20%</td></tr><tr><td>three</td><td>64.77%</td><td>68.21%</td><td>65.69%</td><td>64.44%</td><td>74.43%</td><td>76.47%</td><td>72.95%</td><td>72.36%</td></tr><tr><td>two</td><td>69.86%</td><td>75.04%</td><td>70.57%</td><td>70.40%</td><td>74.65%</td><td>67.77%</td><td>72.33%</td><td>72.53%</td></tr><tr><td rowspan="3">D</td><td>four</td><td>36.17%</td><td>15.89%</td><td>25.52%</td><td>18.89%</td><td>69.25%</td><td>62.73%</td><td>71.54%</td><td>70.71%</td></tr><tr><td>three</td><td>53.57%</td><td>34.50%</td><td>54.53%</td><td>55.05%</td><td>75.94%</td><td>74.66%</td><td>73.33%</td><td>73.06%</td></tr><tr><td>two</td><td>65.24%</td><td>63.89%</td><td>73.02%</td><td>72.98%</td><td>66.21%</td><td>64.99%</td><td>73.87%</td><td>74.28%</td></tr></tbody></table>

## 3.5 Comparison of machine learning and deep learning

Table 7 shows the comparison of machine learning and deep learning. In order to compare the difference in forecasting accuracy between machine learning and deep learning, it is necessary to make the conditions other than the method the same. Therefore, among the forecasts for 2018 with training data of 4 years, without meteorological data as explanatory variables, and with MA data as explanatory variables, we compared the forecasting results of the most accurate methods for both machine learning and deep learning. The forecasting accuracy of deep learning was high in stores A and D, and that of machine learning was high in stores B and C. From this, it is unclear which machine learning and deep learning are better for forecasting the number of customers visiting. However, deep learning is at the beginning of the research, and we plan to adjust the parameters in the future.

<table><caption>**Table 7.** Comparison of machine learning and deep learning</caption><thead><tr><th rowspan="2">Store</th><th rowspan="2">Machine learning</th><th colspan="2">Deep learning</th></tr><tr><th>RNN</th><th>LSTM</th></tr></thead><tbody><tr><td>A</td><td>79.10%</td><td>81.05%</td><td>73.90%</td></tr><tr><td>B</td><td>76.88%</td><td>64.10%</td><td>63.52%</td></tr><tr><td>C</td><td>79.59%</td><td>74.27%</td><td>70.20%</td></tr><tr><td>D</td><td>55.21%</td><td>62.73%</td><td>70.71%</td></tr></tbody></table>

## 4 Conclusion

In this paper, it is proposed the forecasting of the number of customers visiting restaurants using machine learning and statistical method. The following results were obtained.
(1) The MA is effective when the trend of the number of customers visiting fluctuates rapidly. However, since the forecast period is short (4 months), consideration will be given based on the forecast results for a longer period.

(2) Normalization for each year of training data is effective when the annual average number of customers visiting increases or decreases monotonically.

(3) Depending on the location of the store, the meteorological data may affect the forecasting accuracy.

We will proceed with research on deep learning in forecasting the number of customers visiting, aiming to improve the forecasting accuracy.

## References

1. Takashi T., Tomohiro H., Takeshi S., Takeshi T.: Demand forecasting in restaurants using machine learning and statistical analysis, Procedia CIRP, Vol.79, pp.679-683 (2019).

2. Takashi T., Tomohiro H., Takeshi S., Takeshi T.: Restaurants store management based on demand forecasting, Procedia CIRP, Vol.88, pp.580-583 (2020).

3. Jerome H.M.: Greedy Function Approximation: A Gradient Boosting Machine, The Annals of Statistics, Vol.29, No.5., pp.1189-1232 (2001)

4. Yoichi M., Takeshi K., Yoshinobu Y.: Community-Based Participatory Service Engineering, Case Studies and Technologies, Global Perspectives on Service Science: Japan, Springer, pp.63-78 (2016).

5. Bernard S., Fabio R., Flavio R., Fabricio F., Jonice O.: Scholar Performance Prediction using Boosted Regression Trees Techniques, European Symposium on Artificial Neural Networks 2017 proceedings, pp.329-334 (2017).

6. Antonio C., Jamie A., Ender K.: Decision Forests: A Unified Framework for Classification, Regression, Density Estimation, Manifold Learning and Semi-Supervised Learning, Foundations and Trends in Computer Graphics and Vision, vol.7, nos.2-3, pp.81-227 (2012).

7. Sebastian R.: Python Machine Learning (Japanese Edition), Impress Corp, pp.86-87 (2016).

8. B.W.Boich, C.J.Huang: Applied Statistics analysis (Japanese Edition), Morikita Publishing Co. Ltd., pp.27-28, pp.167-172 (1968).

9. Kouki A. Deep Learning from Scratch 2, O’Reilly Japan, pp.175-187, pp.223-244 (2018)

10. Takashi T., Yuta H., Takeshi S.: Forecasting Customers Visiting Using Machine Learning and Characteristics Analysis with Low Forecasting Accuracy Days, Advances in Production Management Systems. Towards Smart and Digital Manufacturing, Springer, pp.670-678 (2020).