0
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ Do you have any other data attributes, or just the time-of-day? $\endgroup$ Aug 19 at 10:53
  • $\begingroup$ At the moment it is only time vs. count. I may add weather and other information in the future. $\endgroup$
    – k_ele
    Aug 20 at 2:52
1
$\begingroup$

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.
$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – k_ele
    Aug 31 at 4:44
0
$\begingroup$

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://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://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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Aug 20 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.