时间序列预测 预测时间段
Notwithstanding the time series analysis is widely implemented for the business and sociology, it is still considered as one of the areas where most of the data scientists and machine learning engineers are undertaking. The accuracy of a time series forecasting model still highly depends on the degree of coverages of the real factors taken into consideration while modelling. This is the main reason why Stephen Hawking and Ransom Riggs poured some cold water on this, where currently the time series forecasting models are still not robust enough.
尽管时间序列分析已广泛应用于商业和社会学,但仍被视为大多数数据科学家和机器学习工程师所从事的领域之一。 时间序列预测模型的准确性仍然高度取决于建模时考虑的实际因素的覆盖程度。 这就是Stephen Hawking和Ransom Riggs对此倒水的主要原因,因为当前时间序列预测模型仍然不够稳健。
“ There is no way that we can predict the weather six months ahead beyond giving the seasonal average. ” ― Stephen Hawking, Black Holes and Baby Universes and Other Essays
“除了给出季节性平均值外,我们无法预测未来六个月的天气。 ”- 斯蒂芬·霍金 ( Stephen Hawking), 《黑洞与婴儿宇宙》和其他论文
“Weatherman says,” Kev scoffed. “I wouldn’t trust that silly bugger to know it’s raining now.”― Ransom Riggs, Miss Peregrine’s Home for Peculiar Children
“气象员说,”凯夫嘲笑道。 “我不知道那个傻小虫知道现在正在下雨。”- 佩雷吉里恩 小姐的特殊儿童之家 Ransom Riggs
Nevertheless, some communities benefit from this technology. The investors perform time series analysis to figure out the opportunity to step into the stock market. The manufacturing industries use time series analysis to carry out the yield projection, inventory study and workload projection. In the medical field, doctors study the signals’ trends generated by human bodies for treatment. Census Analysis is frequently carried out by the governments to understand their citizens well [1].
尽管如此,一些社区还是从这项技术中受益。 投资者进行时间序列分析,以找出进入股票市场的机会。 制造业使用时间序列分析来进行产量预测,库存研究和工作量预测。 在医学领域,医生研究人体产生的信号趋势,以进行治疗。 政府经常进行人口普查分析,以充分了解其公民[1]。
时间序列数据 (Time Series Data)
Let’s start with the examination of the dataset that we used for regression and classification. It is known as cross-sectional data. It is a type of data collected by observing many subjects (such as individuals, firms, countries, or region) at one point or period of time. It is used to compare different subjects [2]. Time series data is recorded based on time intervals where its order is vital. Thus, any predictive model that is primarily based on time collection statistics contains time as an impartial variable.
让我们从检查用于回归和分类的数据集开始。 这称为横截面数据。 它是通过在一个时间点或某个时间段观察许多主题(例如个人,公司,国家或地区)而收集的一种数据。 它用于比较不同的主题[2]。 时间序列数据是根据时间顺序记录的,其中时间顺序至关重要。 因此,任何主要基于时间收集统计信息的预测模型都将时间作为公正变量。
![Image for post](https://miro.medium.com/max/9999/0*oUW4MU52Di5ErIPx.png)
时间序列分析和预测可以解决问题 (Problems could be solved by Time Series Analysis and Forecasting)
- Manufacturing — material demand; production schedules; workload projection; yield projection 制造业-材料需求; 生产时间表; 工作量预测; 产量预测
- Retail — Sales Forecasting; inventory study 零售-销售预测; 清单研究
- Finance — Stock Prediction; Market Potential Exploration 财务—图库照片预测; 市场潜力探索
时间序列分析与时间序列预测 (Time Series Analysis vs Time Series Forecasting)
This story will be focused on time series forecasting. However, it is important to solve a few general confusion about the term “analysis” and “forecasting”. Time series forecasting belongs to a part of predictive modelling whereas time series analysis belongs to a part of descriptive analysis. The output of time series forecasting is always a single value at a specific factor in time. The time series analysis is conducted to look for the significant trends and seasonal patterns over data including the factors affecting the previous decisions.
这个故事将集中在时间序列预测上。 但是,解决有关“分析”和“预测”一词的一些一般性混淆很重要。 时间序列预测属于预测建模的一部分,而时间序列分析属于描述性分析的一部分。 时间序列预测的输出始终是特定时间因子的单个值。 进行时间序列分析以查找数据的重要趋势和季节性模式,包括影响先前决策的因素。
时间序列数据的类型 (Types of Time Series Data)
In order to kickstart to build a predictive time series model, it is important to understand and identify the data patterns over time. There are four main types of time-series data, which are: -
为了启动建立预测性时间序列模型,重要的是了解和识别随时间变化的数据模式。 时间序列数据有四种主要类型,分别是:-
Seasonal -> The patterns of the data are repeated over a specific period.
季节性 ->数据模式在特定时间段内重复。
Trend -> The values of the data are increased or decreased in a reasonably predictable pattern.
趋势 ->数据值以合理可预测的方式增加或减少。
Cyclical -> The values of the data exhibit rises and falls that are not of a fixed frequency often due to economic conditions.
周期性 ->数据值通常由于经济状况而呈现出不固定频率的上升和下降。
Random -> The patterns of the data do not fall in any 3 categories mentioned above. They are totally irregular.
随机 ->数据模式不属于上述任何3类。 它们是完全不规则的。
![Image for post](https://miro.medium.com/max/9999/1*xYwv3xjv1sdq4rPUlzRarA.jpeg)
稍等一下 (Hold on a second)
Before you choose any algorithm to carry out time-series forecasting, there are a few points that I think you should take into consideration, include:
在选择任何算法进行时间序列预测之前,我认为您应考虑以下几点:
- What are the assumptions that you have made on the modelling data? 您对建模数据进行了哪些假设?
- What are the factors that may affect the outcome? 可能影响结果的因素有哪些?
- Is there any alternative solution that may solve this problem better? 是否有其他解决方案可以更好地解决此问题?
简单的时间序列预测方法 (Simple Time Series Forecasting Approaches)
There are some forecasting approaches are extremely simple and surprisingly effective, such as average approach, naive approach and seasonal naive approach [3].
有一些预测方法非常简单且出人意料地有效,例如平均方法,幼稚方法和季节性幼稚方法[3]。
Average approach -> The predicted value is obtained by averaging the previous data over time.
平均方法 ->预测值是通过将先前数据随时间平均而获得的。
Naive approach -> A range of predicted values is obtained by making a prediction based on the previous range of actual data. Adjustment and attempt to establish the causal factors are not essential.
天真的方法 ->通过基于先前的实际数据范围进行预测来获得预测值范围。 调整和尝试建立因果关系不是必需的。
Seasonal naive approach -> It is a naive approach alike but makes predictions based on years’ or months’ data. It is efficient for highly seasonal data.
季节性的天真的方法 ->这是一种天真的方法,但是基于几年或几个月的数据进行预测。 它对于高度季节性的数据非常有效。
基于回归的时间序列预测方法 (Regression-Based Time Series Forecasting Approaches)
If the data have a certain number of fixed trends, regression-based time series forecasting approaches fix the data better compared to simply time series forecasting approaches. The data can be linear, polynomial or exponential. In order to implement the algorithm, at least you need to know [3]:
如果数据具有一定数量的固定趋势,则与简单的时间序列预测方法相比,基于回归的时间序列预测方法可以更好地固定数据。 数据可以是线性,多项式或指数形式。 为了实现该算法,至少您需要知道[3]:
- Simple linear regression 简单线性回归
- Least squares estimation 最小二乘估计
- Matrix formulation 基质配方
- Nonlinear regression 非线性回归
平滑预测方法 (Smoothing Forecasting Approaches)
Unlike regression models, which are built on the assumptions on the trend structure, time series smoothing approaches are designed to adjust the changes in the data over time. There are two most general methods, which are:
与基于趋势结构的假设建立的回归模型不同,时间序列平滑方法旨在调整数据随时间的变化。 有两种最通用的方法:
Moving average -> Obtained by taking the arithmetic mean of a given set of values.
移动平均值 ->通过获取一组给定值的算术平均值获得。
![Image for post](https://miro.medium.com/max/9999/1*OMbwQkjb7I5rNI9jCS7T9g.png)
Exponential smoothing -> Obtained by taking a weighted average over all past values, giving more weight to the most recent observations. The purpose is to take in considerations of older information while prioritizing the most recent data.
指数平滑 ->通过对所有过去值进行加权平均值获得,从而对最新的观测值赋予更大的权重。 目的是在优先考虑最新数据时考虑旧信息。
时间序列建模的其他注意事项 (Other Consideration for Time Series Modelling)
Like other machine learning algorithms, to develop a time series model, you are required to prepare both training and validation datasets. You may take the earlier data to be in the training dataset and the latest data to be in the validation dataset.
与其他机器学习算法一样,要开发时间序列模型,则需要准备训练和验证数据集。 您可以将较早的数据存储在训练数据集中,而将最新的数据存储在验证数据集中。
翻译自: https://medium.com/vitrox-publication/what-is-a-time-series-forecasting-d020d657f11a
时间序列预测 预测时间段