Selaa lähdekoodia

Fix component plot with logistic floor

bletham 7 vuotta sitten
vanhempi
commit
a43cfe8995
3 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1 1
      R/DESCRIPTION
  2. 1 1
      R/R/prophet.R
  3. 1 1
      python/fbprophet/forecaster.py

+ 1 - 1
R/DESCRIPTION

@@ -1,6 +1,6 @@
 Package: prophet
 Package: prophet
 Title: Automatic Forecasting Procedure
 Title: Automatic Forecasting Procedure
-Version: 0.2
+Version: 0.2.0.9000
 Date: 2017-09-02
 Date: 2017-09-02
 Authors@R: c(
 Authors@R: c(
   person("Sean", "Taylor", email = "sjt@fb.com", role = c("cre", "aut")),
   person("Sean", "Taylor", email = "sjt@fb.com", role = c("cre", "aut")),

+ 1 - 1
R/R/prophet.R

@@ -1569,7 +1569,7 @@ plot_forecast_component <- function(
 #'
 #'
 #' @keywords internal
 #' @keywords internal
 seasonality_plot_df <- function(m, ds) {
 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)) {
   for (name in names(m$extra_regressors)) {
     df_list[[name]] <- 0
     df_list[[name]] <- 0
   }
   }

+ 1 - 1
python/fbprophet/forecaster.py

@@ -1370,7 +1370,7 @@ class Prophet(object):
         -------
         -------
         A dataframe with seasonal components on ds.
         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:
         for name in self.extra_regressors:
             df_dict[name] = 0.
             df_dict[name] = 0.
         df = pd.DataFrame(df_dict)
         df = pd.DataFrame(df_dict)