[bugfix] Run GC after model fitting to prevent memory errors.

This commit is contained in:
Sean J. Taylor 2017-04-12 15:21:31 -07:00
parent 6d387a4640
commit c164367c08

View file

@ -559,6 +559,7 @@ fit.prophet <- function(m, df, ...) {
m$params$k <- m$params$k + m$params$delta[, 1]
m$params$delta <- matrix(rep(0, length(m$params$delta)), nrow = n.iteration)
}
gc() ## This is hack. We don't know why it works but it solves issue #93.
return(m)
}