admin管理员组

文章数量:1534212

时间序列预测最大预测误差

入门(Getting Started)

Measurement is the first step that leads to control and eventually improvement.

测量是导致控制并最终改善的第一步。

H. James Harrington

詹姆斯·哈灵顿

In many business applications, the ability to plan ahead is paramount and in the majority of such scenarios, we use forecasts to help us plan ahead. For eg., If I run a retail store, how many boxes of that shampoo should I order today? Look at the Forecast. Will I achieve my financial targets by the end of the year? Let’s forecast and make adjustments if necessary. If I run a bike rental firm, how many bikes do I need to keep at a metro station tomorrow at 4pm?

在许多业务应用程序中,预先计划的能力至关重要,在大多数此类情况下,我们使用预测来帮助我们预先计划。 例如,如果我经营一家零售店,今天应该订购几盒这种洗发水? 查看预测。 我会在年底之前实现财务目标吗? 让我们进行预测并在必要时进行调整。 如果我经营一家自行车租赁公司,明天下午4点我需要在地铁站养多少辆自行车?

If for all of these scenarios, we are taking actions based on the forecast, we should also have an idea about how good those forecasts are. In classical statistics or machine learning, we have a few general loss functions, like the squared error or the absolute error. But because of the way Time Series Forecasting has evolved, there are a lot more ways to assess your performance.

如果对于所有这些情况,我们都基于预测采取了行动,那么我们也应该对这些预测的良好程度有所了解。 在经典统计或机器学习中,我们有一些一般的损失函数,例如平方误差或绝对误差。 但是,由于时间序列预测的发展方式,有很多评估绩效的方法。

In this blog post, let’s explore the different Forecast Error measures through experiments and understand the drawbacks and advantages of each of them.

在此博客文章中,让我们通过实验探索不同的“预测误差”度量,并了解它们各自的弊端和优势。

时间序列预测中的指标 (Metrics in Time Series Forecasting)

There are a few key points which makes the metrics in Time Series Forecasting stand out from the regular metrics in Machine Learning.

有几个关键点使时间序列预测中的指标与机器学习中的常规指标脱颖而出。

1. Temporal Relevance

1.时间相关性

As the name suggests, Time Series Forecasting have the temporal aspect built into it and there are metrics like Cumulative Forecast Error or Forecast Bias which takes this temporal aspect as well.

顾名思义,“时间序列预测”内置了时间方面,并且诸如“累积预测误差”或“预测偏差”之类的指标也采用了该时间方面。

2. Aggregate Metrics

2.汇总指标

In most business use-cases, we would not be forecasting a single time series, rather a set of time series, related or unrelated. And the higher management would not want to look at each of these time series individually, but rather an aggregate measure which tells them directionally how well we are doing the forecasting job. Even for practitioners, this aggregate measure helps them to get an overall sense of the progress they make in modelling.

在大多数业务用例中,我们不会预测单个时间序列,而是一组相关或不相关的时间序列。 而且高层管理人员不想单独查看这些时间序列中的每个时间序列,而是希望通过汇总指标来定向地告诉他们我们在预测工作中的表现如何。 即使对于从业者,这种总体衡量标准也可以帮助他们全面了解建模方面的进展。

3. Over or Under Forecasting

3.高于或低于预测

Another key aspect in forecasting is the concept of over and under forecasting. We would not want the forecasting model to have structural biases which always over or under forecasts. And to combat these, we would want metrics which doesn’t favor either over-forecasting or under-forecasting.

预测的另一个关键方面是预测过度和预测不足的概念。 我们不希望预测模型具有总是高于或低于预测的结构性偏差。 为了解决这些问题,我们希望采用既不偏高预测又不偏低预测的指标。

4. Interpretability

4.可解释性

The final aspect is interpretability. Because these metrics are also used by non-analytics business functions, it needs to be interpretable.

最后一个方面是可解释性。 因为这些度量标准也由非分析业务功能使用,所以它必须是可解释的。

Because of these different use cases, there are a lot of metrics that is used in this space and here we try to unify it under some structure and also critically examine them.

由于这些用例不同,因此在此空间中使用了很多指标,在这里我们尝试将其统一为某种结构,并对其进行严格审查。

预测指标分类 (Taxonomy of Forecast Metrics)

We can classify the different forecast metrics. broadly,. into two buckets — Intrinsic and Extrinsic. Intrinsic measures are the measures which just take the generated forecast and ground truth to compute the metric. Extrinsic measures are measures which use an external reference forecast also in addition to the generated forecast and ground truth to compute the metric.

我们可以对不同的预测指标进行分类。 宽广地,。 分为两个部分-内部和外部。 本质度量是仅采用生成的预测和基础事实来计算度量的度量。 外在测度是除了生成的预测和地面事实以外还使用外部参考预测来计算度量的测度。

Let’s stick with the intrinsic measures for now(Extrinsic ones require a whole different take on these metrics). There are four major ways in which we calculate errors — Absolute Error, Squared Error, Percent Error and Symmetric Error. All the metrics that come under these are just different aggregations of these fundamental errors. So, without loss of generality, we can discuss about these broad sections and they would apply to all the metrics under these heads as well.

现在让我们继续使用内在度量(外在度量需要对这些度量采取完全不同的处理)。 我们有四种主要的计算误差的方法-绝对误差,平方误差,百分比误差和对称误差。 这些指标下的所有指标只是这些基本错误的不同汇总。 因此,在不失一般性的前提下,我们可以讨论这些广泛的部分,它们也将适用于这些主题下的所有指标。

绝对误差 (Absolute Error)

This group of error measurement uses the absolute value of the error as the foundation.

这组误差测量以误差的绝对值为基础。

平方误差 (Squared Error)

Instead of taking the absolute, we square the errors to make it positive, and this is the foundation for these metrics.

我们将误差平方成正数,而不是取绝对值,这是这些指标的基础。

误差百分比 (Percent Error)

In this group of error measurement, we scale the absolute error by the ground truth to convert it into a percentage term.

在这组误差测量中,我们根据基本事实对绝对误差进行缩放,以将其转换为百分比项。

对称误差 (Symmetric Error)

Symmetric Error was proposed as an alternative to Percent Error, where we take the average of

本文标签: 误差可以通过序列措施时间