From a43cfe8995e86f6217da93096f39f4d045b487e1 Mon Sep 17 00:00:00 2001 From: bletham Date: Tue, 10 Oct 2017 21:24:23 -0700 Subject: [PATCH] Fix component plot with logistic floor --- R/DESCRIPTION | 2 +- R/R/prophet.R | 2 +- python/fbprophet/forecaster.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/DESCRIPTION b/R/DESCRIPTION index 97c6e1d..f89ec25 100644 --- a/R/DESCRIPTION +++ b/R/DESCRIPTION @@ -1,6 +1,6 @@ Package: prophet Title: Automatic Forecasting Procedure -Version: 0.2 +Version: 0.2.0.9000 Date: 2017-09-02 Authors@R: c( person("Sean", "Taylor", email = "sjt@fb.com", role = c("cre", "aut")), diff --git a/R/R/prophet.R b/R/R/prophet.R index 7f2ac91..a1daaa1 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -1569,7 +1569,7 @@ plot_forecast_component <- function( #' #' @keywords internal seasonality_plot_df <- function(m, ds) { - df_list <- list(ds = ds, cap = 1) + df_list <- list(ds = ds, cap = 1, floor = 0) for (name in names(m$extra_regressors)) { df_list[[name]] <- 0 } diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index f983969..3f0c323 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -1370,7 +1370,7 @@ class Prophet(object): ------- A dataframe with seasonal components on ds. """ - df_dict = {'ds': ds, 'cap': 1.} + df_dict = {'ds': ds, 'cap': 1., 'floor': 0.} for name in self.extra_regressors: df_dict[name] = 0. df = pd.DataFrame(df_dict)