Is there a standard (or available) way to export a Time Series model in R? PMML would work, but when I I try to use the pmml library, perhaps incorrectly, I get an error:
For example, my code looks similar to this:
require(fpp)
library(forecast)
library(pmml)
data <- ts(livestock, start = 1970, end = 2000,frequency=3)
model <- ses(data , h=10 )
export <- pmml(model)
And the error I get is:
Error in UseMethod("pmml") : no applicable method for 'pmml' applied to an object of class "forecast"
pmml.forecast
listed in?pmml
. Probably the reason why you get this error. – Baggottmaintainer("pmml")
. – Baggottforecast
, you would usesaveRDS(model, "model.rds")
and load it later asmodel <– loadRDS("model.rds")
. – Commons