Approach Any Time Series Forecasting Problem.

Deepak Yadav
The Startup
Published in
5 min readJul 2, 2020

Time series forecasting problem can be solved using different approaches such as statistical methods and other one is machine learning methods.This article mainly focus on machine learning. Statistical method may be I will explain in other upcoming articles.

This article is divided into two parts. The first part explains the basic concept of time series forecasting and second part implement these concept into real world problem.

Content
1-What can be forecast?
2- Determining What to forecast?
3- Forecasting data and methods
4- Time Series Forecasting
5- Predictor variables and time series forecasting

1- What can be forecast?

Some things are easier to forecast and some things are not. for example we can forecast Electricity demand of a city, because we know the factor affecting them such as temperature, holidays, and economic conditions.

On the other hand forecasting stock value is bit tougher, because the factors affecting them are not predictable.

The predictability of an event or a quantity depends on several factors:
* how well we understand the factors that contribute to it;
* how much data is available;
* whether the forecasts can affect the thing we are trying to forecast.

2- Determining What to forecast?

Before jump directly into forecast we need to understand what to forecast. it is necessary to ask whether forecasts are needed for
* every product line, or for groups of products?
* every sales outlet, or for outlets grouped by region, or only for total sales?
* weekly data, monthly data or annual data?

It is also necessary to consider the forecasting horizon. Will forecasts be required for one month in advance, for 6 months, or for ten years? Different types of models will be necessary, depending on what forecast horizon is most important.

How frequently are forecasts required? Forecasts that need to be produced frequently are better done using an automated system than with methods that require careful manual work.

Once it has been determined what forecasts are required, it is then necessary to find or collect the data on which the forecasts will be based.

The data may include sales records of a company, the historical demand for a product, or the unemployment rate for a geographic region.

3- Forecasting data and methods

The appropriate forecasting methods depend largely on what data are available.

Qualitative forecasting methods (guesswork) : If there are no data available, or if the data available are not relevant to the forecasts, then qualitative forecasting methods must be used

Quantitative forecasting methods: If numerical information about the past is available and it is reasonable to assume that some aspects of the past patterns will continue into the future.

4- Time Series Forecasting

Anything that is observed sequentially over time is a time series. In this article, we will only consider time series that are observed at regular intervals of time (e.g., hourly, daily, weekly, monthly, quarterly, annually). Irregularly spaced time series can also occur, but are beyond the scope of this article.

5- Predictor variables and time series forecasting

Predictor variables are often useful in time series forecasting. For example, suppose we wish to forecast the hourly electricity demand (ED) of a hot region during the summer period. A model with predictor variables might be helpful:

Time series forecasting model into three form:
explanatory model:
ED = f ( current temperature, strength of economy, population, time of day, day of week, error ) .

time series model:
ED t + 1 = f ( ED t , ED t − 1 , ED t − 2 , ED t − 3 , … , error )

mixed models:
ED t + 1 = f ( ED t , current temperature, time of day, day of week, error )

These types of “mixed models” have been given various names in different disciplines. They are known as dynamic regression models, panel data models, longitudinal models, transfer function models, and linear system models (assuming that f is linear).

Conclusion:
An explanatory model is useful because it incorporates information about other variables, rather than only historical values of the variable to be forecast. However, there are several reasons a forecaster might select a time series model rather than an explanatory or mixed model. First, the system may not be understood, and even if it was understood it may be extremely difficult to measure the relationships that are assumed to govern its behaviour. Second, it is necessary to know or forecast the future values of the various predictors in order to be able to forecast the variable of interest, and this may be too difficult. Third, the main concern may be only to predict what will happen, not to know why it happens. Finally, the time series model may give more accurate forecasts than an explanatory or mixed model.

The model to be used in forecasting depends on the resources and data available, the accuracy of the competing models, and the way in which the forecasting model is to be used.

Next part: The basic steps in a forecasting task (coming soon)

The End!

If you like the content.Feel free to upvote it! Thanks

--

--