Explorar o código

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

Sean J. Taylor %!s(int64=8) %!d(string=hai) anos
pai
achega
c164367c08
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      R/R/prophet.R

+ 1 - 0
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)
 }