0

在我之前的一个产品预测问题之后,假设我有 5 个产品要预测,如下面的数据:

 units_vector <- c(89496264,81820040,80960072,109164545,96226255,96270421,95694992,117509717,105134778,0)
library(data.table)
dt <- data.table('time' = rep(c(1:10),3),
                 'units'= c(units_vector,units_vector+runif(n = 10, max = 1000000),units_vector+runif(n = 10, max = 1000000)),
                 'product' = c(rep("A", 10),rep("B", 10),rep("C", 10))
)

我想预测unitsfor time = 10all products。

我可以看到在 处time = 4*kk = 1,2,...单位数量大幅增加,我想将其作为季节性因素包括在内。

我怎么能这样做R?也许与prophet?任何其他library或方式也可以。

4

1 回答 1

0

您也这样做:根据产品拟合模型y = a*season + b,并且对所有产品都相等(如果您假设所有产品的季节性相同)。b = p(product)a

于 2018-08-14T11:46:20.807 回答