<h1>Straight answer:</h1>
<p>There is no right answer as it depends on many factors. But here are some keywords you can look into:</p>
<p>Keywords about your problem:</p>
<ul>
<li><strong>Time Series</strong></li>
<li>Periodic</li>
<li><strong>Forecasting</strong>.</li>
<li>Uni-variable</li>
</ul>
<p>About the model, I'd recommend checking ARIMA. But before jumping into code.</p>
<p>A good problem solving with Data Science is a dynamic process for deeply understanding your <strong>business</strong> while <em>testing hypothesis with</em> <strong>data</strong>.</p>
<h4>Business:</h4>
<ul>
<li>If you are predicting visitors in a beach, for instance, it will probably depend on weather, weekdays and holidays.</li>
<li>If it's a bank, you might have more visits on pay-day and people may choose the time with less expected line length.</li>
<li>If it's an emergency hospital, you'll find a whole new situation.</li>
</ul>
<p>So I encourage you to think of your real problem before (or while) diving into math and programming.</p>
<h4>Data:</h4>
<p>Depending on your available data, you could test some hypothesis. For example: &quot;The weekday won't interfere much on the visitors&quot;. Once you are familiar with your data and your business, than you can even model it into a simple periodic regression. For example:</p>
<ul>
<li>Everyday my restaurant has 2 main peaks, one for lunch and other for dinner.</li>
<li>I'll assume my data is well described by 2 Gaussian distribution across the day.</li>
<li>Model it by a simple regression to find the best parameters for your Gaussian curves and than check how well it fits.</li>
<li>Check the cases where the model fails and set new hypothesis.</li>
</ul>

CC BY-SA 4.0
2021-08-31T04:44:10.813Z
Thank you! I'll keep that as a reference! It was very informative with concrete examples!
I felt that factors such as the weather and temperature are also important, since in my case I have to take measurements in places where I am exposed to direct sunlight.
k_ele
CC BY-SA 4.0
2021-08-20T04:08:48.373Z
2021-08-20T04:08:48.373Z
Andre Goulart
<p>There are various cheat sheets to recommend what predictive model to use in different situations. Here’s a couple to guide you on options for your dataset.</p>
<p><a href="https://i.sstatic.net/9lf3e.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9lf3e.jpg" alt="Scimitar Learn Cheat Sheet" /></a> <a href="https://scikit-learn.org/stable/tutorial/machine_learning_map/index.html" rel="nofollow noreferrer">https://scikit-learn.org/stable/tutorial/machine_learning_map/index.html</a></p>
<p>For this first cheat sheet with your example, you would begin with the start icon. For the first question &gt; 50 samples, the answer is yes. For the second question predict category, the answer is no. For the third question predict quantity, the answer is yes. For the fourth question, &lt; 100K samples, the answer is yes . The suggested type of regression analysis to try from this cheat sheet is a SGD Regressor.</p>
<p><a href="https://i.sstatic.net/2QSlx.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2QSlx.jpg" alt="Microsoft Azure Machine Learning Cheat Sheet" /></a> <a href="https://docs.microsoft.com/en-us/azure/machine-learning/algorithm-cheat-sheet" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/machine-learning/algorithm-cheat-sheet</a></p>
<p>For the cheat sheet you example begin with the question what do you want to do. The answer is predict values; so again we see this should be some type of regression analysis. There are a few options on this one that would be appropriate to try, such as a Poisson Regression.</p>
<p>After deciding which model to use the next decision is how to implement the model. Kimball made a statement a good decade ago,  <em>In today’s environment, most organizations should use a vendor-supplied ETL tool as a general rule.</em> This was mainly due to maintenance costs. We’ve reached the same level of maturity with data science tools that same logic can be applied for common data science models.</p>

CC BY-SA 4.0
2021-08-20T04:12:28.740Z
Hi, @Christopher! Those are nice guidelines. But maybe you could try to be more specific. At least guiding the user through this mindmap and helping them finding their case.
Andre Goulart
CC BY-SA 4.0
2021-08-19T23:44:17.943Z
2021-08-20T06:05:29.393Z
2021-08-20T06:05:29.393Z
Christopher Klaus
<p>I want to create a model to predict the number of visitors.</p>
<p>Currently, I have a year's csv data for predicting the number of visitors, which is collected every 10 seconds.</p>
<p>I would like to predict the number of future visitors on a daily basis based on this data for the past year.</p>
<p>What kind of method or model can I use to achieve this? I can use a graphics board for learning.</p>
<p>If you have any page of sample codes, it would be very helpful.</p>
<p><a href="https://i.sstatic.net/YwjCs.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YwjCs.jpg" alt="sample chart of one day" /></a></p>

CC BY-SA 4.0
2021-08-19T10:53:13.353Z
Do you have any other data attributes, or just the time-of-day?
Oliver Mason
CC BY-SA 4.0
2021-08-20T02:52:14.240Z
At the moment it is only time vs. count.
I may add weather and other information in the future.
k_ele
<ai-design>
How to create a model for predicting the number of visitors
k_ele
# How to create a model for predicting the number of visitors

(Asked by: username_0 on 2021-08-19)

I want to create a model to predict the number of visitors.

Currently, I have a year's csv data for predicting the number of visitors, which is collected every 10 seconds.

I would like to predict the number of future visitors on a daily basis based on this data for the past year.

What kind of method or model can I use to achieve this? I can use a graphics board for learning.

If you have any page of sample codes, it would be very helpful.

[![sample chart of one day](https://i.sstatic.net/YwjCs.jpg)](https://i.sstatic.net/YwjCs.jpg)

**Tags:** ai-design

> **Comments:**
> **username_1**: Do you have any other data attributes, or just the time-of-day?  
> **username_0**: At the moment it is only time vs. count. I may add weather and other information in the future.  

---

## 2 answers

### Answer by username_2 on 2021-08-20. Score: 1 | Accepted answer

# Straight answer:

There is no right answer as it depends on many factors. But here are some keywords you can look into:

Keywords about your problem:

* **Time Series**
* Periodic
* **Forecasting**.
* Uni-variable

About the model, I'd recommend checking ARIMA. But before jumping into code.

A good problem solving with Data Science is a dynamic process for deeply understanding your **business** while *testing hypothesis with* **data**.

#### Business:

* If you are predicting visitors in a beach, for instance, it will probably depend on weather, weekdays and holidays.
* If it's a bank, you might have more visits on pay-day and people may choose the time with less expected line length.
* If it's an emergency hospital, you'll find a whole new situation.

So I encourage you to think of your real problem before (or while) diving into math and programming.

#### Data:

Depending on your available data, you could test some hypothesis. For example: "The weekday won't interfere much on the visitors". Once you are familiar with your data and your business, than you can even model it into a simple periodic regression. For example:

* Everyday my restaurant has 2 main peaks, one for lunch and other for dinner.
* I'll assume my data is well described by 2 Gaussian distribution across the day.
* Model it by a simple regression to find the best parameters for your Gaussian curves and than check how well it fits.
* Check the cases where the model fails and set new hypothesis.

> **Comments:**
> **username_0**: Thank you! I'll keep that as a reference! It was very informative with concrete examples! I felt that factors such as the weather and temperature are also important, since in my case I have to take measurements in places where I am exposed to direct sunlight.  

---

### Answer by username_3 on 2021-08-19. Score: 0

There are various cheat sheets to recommend what predictive model to use in different situations. Here’s a couple to guide you on options for your dataset.

[![Scimitar Learn Cheat Sheet](https://i.sstatic.net/9lf3e.jpg)](https://i.sstatic.net/9lf3e.jpg) <https://scikit-learn.org/stable/tutorial/machine_learning_map/index.html>

For this first cheat sheet with your example, you would begin with the start icon. For the first question > 50 samples, the answer is yes. For the second question predict category, the answer is no. For the third question predict quantity, the answer is yes. For the fourth question, < 100K samples, the answer is yes . The suggested type of regression analysis to try from this cheat sheet is a SGD Regressor.

[![Microsoft Azure Machine Learning Cheat Sheet](https://i.sstatic.net/2QSlx.jpg)](https://i.sstatic.net/2QSlx.jpg) <https://docs.microsoft.com/en-us/azure/machine-learning/algorithm-cheat-sheet>

For the cheat sheet you example begin with the question what do you want to do. The answer is predict values; so again we see this should be some type of regression analysis. There are a few options on this one that would be appropriate to try, such as a Poisson Regression.

After deciding which model to use the next decision is how to implement the model. Kimball made a statement a good decade ago, *In today’s environment, most organizations should use a vendor-supplied ETL tool as a general rule.* This was mainly due to maintenance costs. We’ve reached the same level of maturity with data science tools that same logic can be applied for common data science models.

> **Comments:**
> **username_2**: Hi, @Christopher! Those are nice guidelines. But maybe you could try to be more specific. At least guiding the user through this mindmap and helping them finding their case.  

---

