Each time series in the dataset can be assigned one of the following classes:

m5_demand_type(data)

Arguments

data

The result of the m5_prepare function.

Value

A data.table containing item ids (item_id and store_id), ADI and CV2 scores (adi and cv2 respectively) as well as the final class chosen based on the aforementioned scores (demand_type).

Details

  • Smooth (ADI < 1.32 and CV² < 0.49).

  • Intermittent (ADI >= 1.32 and CV² < 0.49)

  • Erratic (ADI < 1.32 and CV² >= 0.49)

  • Lumpy (ADI >= 1.32 and CV² >= 0.49)

Examples

if (FALSE) {
m5_download('data')
c(sales_train,
  sales_test,
  sell_prices,
  calendar) %<-% m5_get_raw_evaluation('data')

m5_data  <-
   m5_prepare(sales_train, sales_test, calendar, sell_prices)

m5_demand <- m5_demand_type(m5_data)
}