| idclass | R Documentation |
Categorise intermittent demand time series according to their average inter-demand interval and the squared coefficient of variation of their non-zero demand, indicating whether they should be modelled with Croston's method, SBA, or SES.
idclass(
data,
type = c("PKa", "SBC", "KHa", "KH", "PK"),
a.in = NULL,
outplot = c("summary", "detail", "none"),
plot.focus = NULL
)
data |
Time series dataset, where each column is a series. Alternatively, this can be a single series. |
type |
Type of categorisation:
The exact schemes are computationally expensive, as SBA is optimised for each
series, unless |
a.in |
Vector of SBA interval smoothing parameters, one for each series. This is
used by the exact categorisations |
outplot |
Plot of the categorisation:
Both plots are also available afterwards with |
plot.focus |
Only relevant to |
The Petropoulos-Kourentzes classification extends the Kostenko-Hyndman one
for series without zero demand, p = 1, which are assigned to SES instead of
Croston's method or SBA. Such series are rare at the original frequency, but common
once a series is temporally aggregated, which is why this classification is used by
imapa. Series with fewer than two non-zero values cannot be
categorised; a warning is given and they are left out of all classes.
An object of class idclass, which is a list containing:
idx.croston |
Index of series that are categorised under Croston. |
idx.sba |
Index of series that are categorised under SBA. |
idx.ses |
Index of series that are categorised under SES. Provided only for
|
cv2 |
Squared coefficient of variation of non-zero demand. |
p |
Average inter-demand interval. |
summary |
Summary of number of series under each category. |
fit.info |
Information used by the methods of the object. Not intended for direct use. |
Nikolaos Kourentzes, nikolaos@kourentzes.com
Petropoulos, F., and Kourentzes, N. (2015). Forecast combinations for intermittent demand. Journal of the Operational Research Society, 66(6), 914–924. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1057/jors.2014.62")}
Syntetos, A. A., Boylan, J. E., and Croston, J. D. (2005). On the categorization of demand patterns. Journal of the Operational Research Society, 56(5), 495–503.
Kostenko, A. V., and Hyndman, R. J. (2006). A note on the categorization of demand patterns. Journal of the Operational Research Society, 57(10), 1256–1257.
plot.idclass, imapa, data.frc.
# Create some data, where each column is a time series
set.seed(1)
dataset <- simID(100, 60, idi=1.15, cv2=0.3)
idclass(dataset)
# Detailed plot of the SBC classification
cls <- idclass(dataset, type="SBC", outplot="detail")
cls$summary
# Focus the detailed plot
idclass(dataset, type="KHa", outplot="detail", plot.focus=c(1.5,1.5))
# Single series
idclass(ts.data1, outplot="none")$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.