Time series categorisation for intermittent demand data.
idclass(data,type=c("PKa","SBC","KHa","KH","PK"),a.in=NULL,
outplot=c("summary","detail","none"),plot.focus=NULL)
Index of series that are categorised under Croston.
Index of series that are categorised under SBA.
Index of series that are categorised under SES. Provided only for "PK" and "PKa" types.
Coefficient of variation squared of non-zero demand.
Inter-demand interval.
Summary of number of series under each category.
Time series dataset. Each column is a series. Alternatively this can be a single series.
Type of categorisation: 1. "SBC" - Syntetos Boylan Croston; 2. "KH" - Kostenko Hyndman (exact*); 3. "KHa" - Kostenko Hyndman (approximate); 4. "PK" - Petropoulos Kourentzes (exact*); 5. "PKa" - Petropoulos Kourentzes (approximate). *These are computationally expensive, as SBA is optimised for each time series.
Vector of SBA demand interval smoothing parameters. This must be same length as number of series. This is used for categorisations "KH" and "PK". If a.in == NULL then the parameters are calculated internally using MAR as a cost function.
Plot results of categorisation: 1. "summary" - simlified plot that reports number of series in each class and cut-off points; 2. "detail" - scatterplot between average interdemand interval (p) and squared coefficient of variation of non-zero demand (CV^2). Series that are categorised for SBA or SES are plotted in shaded areas; 3. "none" - do not produce plot.
Only relevant to outplot == "detail". Can be used to specify the maximum p and CV^2 to plot, so that the scatterplot can be focused on the separation area between the categories. Use vector of two elements. First one is max p and second one is max CV^2. Example: plot.focus=c(1.5,1.5). If NULL then maximums are defined from the dataset.
Nikolaos Kourentzes
Classification schemes described in: F. Petropoulos and N. Kourentzes, 2015, Journal of Operational Research Society. https://link.springer.com/article/10.1057/jors.2014.62. https://kourentzes.com/forecasting/2014/05/13/forecast-combinations-for-intermittent-demand/
Optimisation of the methods described in: N. Kourentzes, 2014, On intermittent demand model optimisation and selection, International Journal of Production Economics, 156: 180-190. tools:::Rd_expr_doi("10.1016/j.ijpe.2014.06.007").
crost
, tsb
, imapa
.
# Create/load some data. Each column is a time series
dataset <- simID(100,60,idi=1.15,cv2=0.3)
idclass(dataset)
Run the code above in your browser using DataLab