From c164367c0841c2539e4aef30fbc986a36d465c4e Mon Sep 17 00:00:00 2001 From: "Sean J. Taylor" Date: Wed, 12 Apr 2017 15:21:31 -0700 Subject: [PATCH] [bugfix] Run GC after model fitting to prevent memory errors. --- R/R/prophet.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/R/prophet.R b/R/R/prophet.R index 5a2cbe3..508d681 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -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) }