1
$\begingroup$

I am working on developing an algorithm which will predict the future traffic for the restaurant. I am confuse that which of the two: Linear regression or time series analysis I should use as the base for my algorithm. The features I am using are: Day,whether there was festival,temperature,climatic condition , current rating,whether there was holiday,service rating,number of reviews etc.

Please guide me how should I proceed . Also how can I optimize my algorithm so that it can learn with time.

$\endgroup$
1
$\begingroup$

The data you are having is panel data which is a combination of both cross sectional data and Time series.

You can try with regression models by giving time stamp to your data .Like maintaining one feature based your weekday (1 to 7).or if you have trends and seasonality in your data you can go to giving week number as feature like (0 to 53) weeks.

$\endgroup$
0
$\begingroup$

Why do you not try both? Test the accuracy of the methods in your test and cross validation set. Use learning curves related techniques to come to a experimental logical conclusion. Remember, this is data "science"!

$\endgroup$
0
$\begingroup$

I think Linear regression is more feasible than time series analysis here, becasuse I think you have lots of categorical variables, and time series analysis works better with purely numeric data.

Many of your categorical vriables are likely to be NA, and many might have high cardinality and thus might not be suited for one-hot-encoding. So you have to choose an algorithm that can handle NA values well and can deal with many unique categorical variables turned into indicator variables. You can also handle this with appropriate preprocessing.

Also you didn't tell use whether your dataset has sub-daily (e.g. hourly) or daily resolution. I think daily resolution is too coarse (weather may change several times per day), guest arrivals may peak in the morning or evening. So time series analysis shines when you want to determine, say, the periodicity (which is likely on an hourly scale for the workdays most restaurants), but your variables seem to be on the daily level and less predictable.

$\endgroup$

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.