Fix component plot with logistic floor

This commit is contained in:
bletham 2017-10-10 21:24:23 -07:00
parent a44b209696
commit a43cfe8995
3 changed files with 3 additions and 3 deletions

View file

@ -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")),

View file

@ -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
}

View file

@ -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)