1

I've been working on a weekly web traffic forecast based on time series. The primary business driver is marketing investment (spending)

I have historical spending data but not future spending data. In this case, how can future web traffic be predicted?

I'd like to have an input request switch where I could change the cost input to see future traffic. (If you spend this much, you will receive these many visits; if you do more, you will get more, and vice versa.)

Roger V.
  • 3,903
sdave
  • 111

1 Answers1

0

You can either use your explanatory variable(s) or not.

If you do not want to use your predictors, you can use simple time series models, like exponential smoothing, ARIMA (both not recommended if you suspect intra-yearly seasonality - better to use an STL method for such "long" seasonalities), or many others.

If you do want to use your predictor, you can use simple methods like regression with ARIMA errors, or alternatively run a regression on the predictors, then fit an exponential smoothing model to residuals. (See above on potential seasonality.) Or do a fancy ML method, like Deep Learning, transformers, or Boosting... but quite honestly, I would go for low hanging fruit like a regression first.

However, in the latter case you will need to feed some future predictor values into the model to get a forecast. You can have the user specify future marketing spend, or use any "reasonable" number, like the historical mean spend, or the last spend, or indeed the result from forecasting the spend itself.

This thread contains some references on forecasting.

Stephan Kolassa
  • 123,354
  • Thank you so much for sharing the references. I would like to use predictors but kind of real-time (that if needed I can change the spend values and the forecast changes on the spot) – sdave Jun 30 '23 at 07:18
  • No problem. Use historical spend and demand to fit a model. Persist the model. Then evaluate the model using the supplied spend (or other predictor) values. Model evaluation typically is many orders of magnitude faster than model training, regardless of what kind of model you use. – Stephan Kolassa Jun 30 '23 at 07:26
  • Is it called (what-if analysis?), so my model is ready and I have a MAPE of less then 10. But I need to change the predictor value for future. how to extend from baseline model to real time forecast? any source to study that? Thak you in advance – sdave Jun 30 '23 at 08:47
  • I'm sorry, but I don't quite understand what your problem is. Is it how to feed the future predictor values into a specific model? That would be a coding question, which is off-topic here, but with an MWE you could ask at StackOverflow in the appropriate tag. – Stephan Kolassa Jun 30 '23 at 09:35
  • I will eleborate a little, so model is prepared, futue predictor values are also applied to the model and we have the result. Now my stakeholders would like to the tweek the future values so for example for week 5 the future predictor for cost = 800 and te visit output is 40000, now my stakeholder would like to change the cost to let's say 1450 to see what could be the visit forecast. They actually want to know the threshold point after which even if they spend more there wont be anyincrement in visit number. – sdave Jun 30 '23 at 09:55
  • 1
    To see the result for a predictor value of 1450, just feed that value in exactly as you fed in 800 before. To find thresholds, best to feed in multiple "reasonable" values and fit, e.g., a spline. (Of course, if you just have a simple linear regression, there won't be a threshold.) – Stephan Kolassa Jun 30 '23 at 09:59