Produces forecasts from a trained model.
# S3 method for croston forecast(object, new_data, specials = NULL, ...)
object | The time series model used to produce the forecasts |
---|---|
new_data | A |
specials | (passed by |
... | Additional arguments for forecast model methods. |
A list of forecasts.
library(tsibble) sim_poisson <- tsibble( time = yearmonth("2012 Dec") + seq_len(24), count = rpois(24, lambda = 0.3), index = time ) sim_poisson %>% model(CROSTON(count)) %>% forecast()#> # A fable: 24 x 4 [1M] #> # Key: .model [1] #> .model time count .mean #> <chr> <mth> <dist> <dbl> #> 1 CROSTON(count) 2015 Jan 0.5 0.5 #> 2 CROSTON(count) 2015 Feb 0.5 0.5 #> 3 CROSTON(count) 2015 Mar 0.5 0.5 #> 4 CROSTON(count) 2015 Apr 0.5 0.5 #> 5 CROSTON(count) 2015 May 0.5 0.5 #> 6 CROSTON(count) 2015 Jun 0.5 0.5 #> 7 CROSTON(count) 2015 Jul 0.5 0.5 #> 8 CROSTON(count) 2015 Aug 0.5 0.5 #> 9 CROSTON(count) 2015 Sep 0.5 0.5 #> 10 CROSTON(count) 2015 Oct 0.5 0.5 #> # … with 14 more rows