# Forecasting sales using Neural Network with just 6 data points?

I have 6 data points which represent 6 months of sales of a new product. Can I use machine learning methods, like a neural network, to forecast the sales of this product over the next year? Specifically, I want to forecast the cumulative sales volume a year into the future (or at month 18), and project what the sales trend would look like from month 7 to month 18.

If possible, I'd like forecast this trend in R.

• Why would you like to use machine learning here? The answer to your question is NO, of course. Commented Apr 16, 2018 at 18:26
• Is it because it is not feasible or is it because machine learning do not do well with limited data? They are different. Thanks in advance. Commented Apr 16, 2018 at 18:54
• It's difficult to forecast 1 year ahead with only 6 months of data. You don't have data for ML. It works only when you have a ton of training data. With your data you can barely do a naive forecast Commented Apr 16, 2018 at 18:56

Can I use machine learning, like a neural network, to forecast the sales of this product over the next year?

Yes - you can used neural networks, or some other generic ML method, to forecast sales. NNets have mixed results for time series, using other methods such as SVM or XGboost is not very common.

The are also other methods which are designed specifically for time series, such as ARIMA and Exponential Smoothing.

If possible, I like to perform the forecasting in R.

There is a package in R, the forecast package, which has many of these methods, including ARIMA, Exponential Smoothing, and some Neural Network models, and it is very easy to use.

.....However,

6 data points is not really enough to use any sophisticated forecasting approach to forecast 7~18 steps ahead, you're better off just using a naive forecast (use the last month of the data as your best guess), or maybe a naive seasonal forecast (use current January to forecast next January, current February to forecast next February, etc...) but even then you need at least 12 months of data, so in your case would have a gap between 7 and 12 and can only forecast from 13 to 18.

Since it is sales data, it is very likely seasonal - so basically, you don't have enough data to forecast anything other than a seasonal naive of month 13 ~ 18.

• Thanks! I know I could use a simple regression like y=a+b*t, where t is the period. Then ARIMA would be like advanced version of that regression. I am just trying to see if something more accurate has been developed in the Machine Learning literature, since I am not that familiar with it. I will review the FORECAST package in R. Commented Apr 16, 2018 at 18:45
• ARIMA with 6 points? It's going to be a total garbage. In the dumbest regression you have 2 parameters to estimate, and with 6 points, it'3 observations per parameter Commented Apr 16, 2018 at 18:58
• @Aksakal I obviously do not expect to have a super accurate prediction. I was hoping to get within 15% absolute error? I hope that's possible. I have a related question. How far ahead do you typically forecast relative to the number of datapoints you have for training? What is the ratio? Commented Apr 16, 2018 at 19:07
• In econometrics it's often said that 4 cycles are necessary for seasonality estimation. Sales data are usually highly seasonal. With 6 months data if you were at a bank, and I was your model risk person, you'd have ZERO chance getting the model approved. I'd recommend to go with expert judgement Commented Apr 16, 2018 at 19:11
• @Aksakal If I have 4 years of monthly data, and I want to forecast next 12 years ahead, would you be more comfortable then? I understand the length of training data too short. I am also trying to see whether the length of the forecast period is too long as well. Thanks again for your inputs! Commented Apr 16, 2018 at 19:15