0
"crost {tsintermittent}"と "croston {forecast}"がサンプル内(トレーニング)値を計算する方法の詳細を理解しようとしています。それらは類似しているが異なる結果を与えるようである。 (以下のサンプルコードを参照)2つの計算が異なるかどうか、または同じ結果を比較しないかどうかはわかりません(各パッケージは異なる用語を使用しています)。Crostonメソッドの計算方法
library (tsintermittent)
library (forecast)
# create an intermittent time-series
x = c(5,5,5,5,5,5,6,8,0,8,0,8,0,0,4,0,0,6,7,0,0,0,9,0,11,0,0)
x_crost = crost(x,h=5) # from the tsintermittent package
x_croston=croston(x,h=5) # from the forecast package
x_croston$fitted
y=data.frame(x,x_crost$frc.in,x_croston$fitted)
y # viex_croston results
plot(x_croston)
lines(x_croston$fitted, col="red")
lines(x_crost$frc.in,col="blue")
ありがとうございます。実際に、私はテストで同じことを発見しました。私は自分の質問に答えようとしていましたが、あなたは私にそれを打ち負かしました。あなたはまた、なぜ初期値が違うのかについて私の次の質問に答えました。再度、感謝します! – Paul