mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-06-03 23:49:47 +00:00
R sub-daily data documentation, bugfixes, and unit tests
This commit is contained in:
parent
b0938df109
commit
093b4b7eec
13 changed files with 1259 additions and 322 deletions
|
|
@ -23,8 +23,7 @@ Imports:
|
|||
scales,
|
||||
stats,
|
||||
tidyr (>= 0.6.1),
|
||||
utils,
|
||||
zoo
|
||||
utils
|
||||
Suggests:
|
||||
knitr,
|
||||
testthat,
|
||||
|
|
|
|||
107
R/R/prophet.R
107
R/R/prophet.R
|
|
@ -162,7 +162,8 @@ validate_inputs <- function(m) {
|
|||
if (grepl("_delim_", h)) {
|
||||
stop('Holiday name cannot contain "_delim_"')
|
||||
}
|
||||
if (h %in% c('zeros', 'yearly', 'weekly', 'yhat', 'seasonal', 'trend')) {
|
||||
if (h %in% c('zeros', 'yearly', 'weekly', 'daily', 'yhat', 'seasonal',
|
||||
'trend')) {
|
||||
stop(paste0('Holiday name "', h, '" reserved.'))
|
||||
}
|
||||
}
|
||||
|
|
@ -215,6 +216,7 @@ compile_stan_model <- function(model) {
|
|||
#' Convert the date to POSIXct object
|
||||
#'
|
||||
#' @param ds Date vector, can be consisted of characters
|
||||
#' @param tz string time zone
|
||||
#'
|
||||
#' @return vector of POSIXct object converted from date
|
||||
#'
|
||||
|
|
@ -235,20 +237,18 @@ set_date <- function(ds = NULL, tz = "GMT") {
|
|||
return(ds)
|
||||
}
|
||||
|
||||
#' Extract hour
|
||||
#' Time difference between datetimes
|
||||
#'
|
||||
#' Extract hour from a POSIXct object
|
||||
#' Compute time difference of two POSIXct objects
|
||||
#'
|
||||
#' @param ds POSIXct object
|
||||
#' @param ds1 POSIXct object
|
||||
#' @param ds2 POSIXct object
|
||||
#' @param units string units of difference, e.g. 'days' or 'secs'.
|
||||
#'
|
||||
#' @return hour of POSIXct object
|
||||
#' @return numeric time difference
|
||||
#'
|
||||
get_hour <- function(ds) {
|
||||
if (!("POSIXct" %in% is(ds))) {
|
||||
stop("ds must be a POSIXct object, use function set_date() to convert first.")
|
||||
}
|
||||
|
||||
return(format(ds , "%H"))
|
||||
time_diff <- function(ds1, ds2, units = "days") {
|
||||
return(as.numeric(difftime(ds1, ds2, units = units)))
|
||||
}
|
||||
|
||||
#' Prepare dataframe for fitting or predicting.
|
||||
|
|
@ -269,7 +269,8 @@ setup_dataframe <- function(m, df, initialize_scales = FALSE) {
|
|||
}
|
||||
df$ds <- set_date(df$ds)
|
||||
if (anyNA(df$ds)) {
|
||||
stop('Unable to parse date format in column ds. Convert to date format. Either %Y-%m-%d or %Y-%m-%d %H:%M:%S')
|
||||
stop(paste('Unable to parse date format in column ds. Convert to date ',
|
||||
'format. Either %Y-%m-%d or %Y-%m-%d %H:%M:%S'))
|
||||
}
|
||||
|
||||
df <- df %>%
|
||||
|
|
@ -278,10 +279,10 @@ setup_dataframe <- function(m, df, initialize_scales = FALSE) {
|
|||
if (initialize_scales) {
|
||||
m$y.scale <- max(abs(df$y))
|
||||
m$start <- min(df$ds)
|
||||
m$t.scale <- as.numeric(difftime(max(df$ds), m$start, units = "secs"))
|
||||
m$t.scale <- time_diff(max(df$ds), m$start, "secs")
|
||||
}
|
||||
|
||||
df$t <- as.numeric(difftime(df$ds, m$start, units = "secs")) / m$t.scale
|
||||
df$t <- time_diff(df$ds, m$start, "secs") / m$t.scale
|
||||
if (exists('y', where=df)) {
|
||||
df$y_scaled <- df$y / m$y.scale
|
||||
}
|
||||
|
|
@ -331,7 +332,8 @@ set_changepoints <- function(m) {
|
|||
}
|
||||
if (length(m$changepoints) > 0) {
|
||||
m$changepoints <- set_date(m$changepoints)
|
||||
m$changepoints.t <- sort(as.numeric(difftime(m$changepoints, m$start, units = "secs"))) / m$t.scale
|
||||
m$changepoints.t <- sort(
|
||||
time_diff(m$changepoints, m$start, "secs")) / m$t.scale
|
||||
} else {
|
||||
m$changepoints.t <- c(0) # dummy changepoint
|
||||
}
|
||||
|
|
@ -361,7 +363,7 @@ get_changepoint_matrix <- function(m) {
|
|||
#' @return Matrix with seasonality features.
|
||||
#'
|
||||
fourier_series <- function(dates, period, series.order) {
|
||||
t <- as.numeric(difftime(dates, set_date('1970-01-01 00:00:00'), units = 'days'))
|
||||
t <- time_diff(dates, set_date('1970-01-01 00:00:00'))
|
||||
features <- matrix(0, length(t), 2 * series.order)
|
||||
for (i in 1:series.order) {
|
||||
x <- as.numeric(2 * i * pi * t / period)
|
||||
|
|
@ -396,6 +398,9 @@ make_seasonality_features <- function(dates, period, series.order, prefix) {
|
|||
#' @importFrom dplyr "%>%"
|
||||
make_holiday_features <- function(m, dates) {
|
||||
scale.ratio <- m$holidays.prior.scale / m$seasonality.prior.scale
|
||||
# Strip dates to be just days, for joining on holidays
|
||||
dates <- set_date(format(dates, "%Y-%m-%d"))
|
||||
|
||||
wide <- m$holidays %>%
|
||||
dplyr::mutate(ds = set_date(ds)) %>%
|
||||
dplyr::group_by(holiday, ds) %>%
|
||||
|
|
@ -509,6 +514,8 @@ parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) {
|
|||
#' Turns on yearly seasonality if there is >=2 years of history.
|
||||
#' Turns on weekly seasonality if there is >=2 weeks of history, and the
|
||||
#' spacing between dates in the history is <7 days.
|
||||
#' Turns on daily seasonality if there is >=2 days of history, and the spacing
|
||||
#' between dates in the history is <1 day.
|
||||
#'
|
||||
#' @param m Prophet object.
|
||||
#'
|
||||
|
|
@ -517,24 +524,24 @@ parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) {
|
|||
set_auto_seasonalities <- function(m) {
|
||||
first <- min(m$history$ds)
|
||||
last <- max(m$history$ds)
|
||||
dt <- diff(as.numeric(difftime(m$history$ds, m$start, units = "d")))
|
||||
dt <- diff(time_diff(m$history$ds, m$start))
|
||||
min.dt <- min(dt[dt > 0])
|
||||
|
||||
yearly.disable <- as.numeric(difftime(last, first, unit = "days")) < 730
|
||||
yearly.disable <- time_diff(last, first) < 730
|
||||
fourier.order <- parse_seasonality_args(
|
||||
m, 'yearly', m$yearly.seasonality, yearly.disable, 10)
|
||||
if (fourier.order > 0) {
|
||||
m$seasonalities[['yearly']] <- c(365.25, fourier.order)
|
||||
}
|
||||
|
||||
weekly.disable <- ((as.numeric(difftime(last, first, unit = "days")) < 14) || (min.dt >= 7))
|
||||
weekly.disable <- ((time_diff(last, first) < 14) || (min.dt >= 7))
|
||||
fourier.order <- parse_seasonality_args(
|
||||
m, 'weekly', m$weekly.seasonality, weekly.disable, 3)
|
||||
if (fourier.order > 0) {
|
||||
m$seasonalities[['weekly']] <- c(7, fourier.order)
|
||||
}
|
||||
|
||||
daily.disable <- ((as.numeric(difftime(last, first, unit = "days")) < 2)) || (min.dt >= 1)
|
||||
daily.disable <- ((time_diff(last, first) < 2) || (min.dt >= 1))
|
||||
fourier.order <- parse_seasonality_args(
|
||||
m, 'daily', m$daily.seasonality, daily.disable, 4)
|
||||
if (fourier.order > 0) {
|
||||
|
|
@ -1051,6 +1058,7 @@ make_future_dataframe <- function(m, periods, freq = 'day',
|
|||
dates <- dates[2:(periods + 1)] # Drop the first, which is max(history$ds)
|
||||
if (include_history) {
|
||||
dates <- c(m$history.dates, dates)
|
||||
attr(dates, "tzone") <- "GMT"
|
||||
}
|
||||
return(data.frame(ds = dates))
|
||||
}
|
||||
|
|
@ -1143,7 +1151,7 @@ plot.prophet <- function(x, fcst, uncertainty = TRUE, plot_cap = TRUE,
|
|||
#' @importFrom dplyr "%>%"
|
||||
prophet_plot_components <- function(
|
||||
m, fcst, uncertainty = TRUE, plot_cap = TRUE, weekly_start = 0,
|
||||
yearly_start = 0, daily_start = 0) {
|
||||
yearly_start = 0) {
|
||||
df <- df_for_plotting(m, fcst)
|
||||
# Plot the trend
|
||||
panels <- list(plot_trend(df, uncertainty, plot_cap))
|
||||
|
|
@ -1151,10 +1159,6 @@ prophet_plot_components <- function(
|
|||
if (!is.null(m$holidays)) {
|
||||
panels[[length(panels) + 1]] <- plot_holidays(m, df, uncertainty)
|
||||
}
|
||||
# Plot daily seasonality, if present
|
||||
if ("daily" %in% colnames(df)) {
|
||||
panels[[length(panels) + 1]] <- plot_daily(m, uncertainty, daily_start)
|
||||
}
|
||||
# Plot weekly seasonality, if present
|
||||
if ("weekly" %in% colnames(df)) {
|
||||
panels[[length(panels) + 1]] <- plot_weekly(m, uncertainty, weekly_start)
|
||||
|
|
@ -1165,7 +1169,8 @@ prophet_plot_components <- function(
|
|||
}
|
||||
# Plot other seasonalities
|
||||
for (name in names(m$seasonalities)) {
|
||||
if (!(name %in% c('daily', 'weekly', 'yearly')) && (name %in% colnames(df))) {
|
||||
if (!(name %in% c('weekly', 'yearly')) &&
|
||||
(name %in% colnames(df))) {
|
||||
panels[[length(panels) + 1]] <- plot_seasonality(m, name, uncertainty)
|
||||
}
|
||||
}
|
||||
|
|
@ -1240,39 +1245,6 @@ plot_holidays <- function(m, df, uncertainty = TRUE) {
|
|||
return(gg.holidays)
|
||||
}
|
||||
|
||||
#' Plot the daily component of the forecast.
|
||||
#'
|
||||
#' @param m Prophet model object
|
||||
#' @param uncertainty Boolean to plot uncertainty intervals.
|
||||
#' @param daily_start Integer specifying the start day of the daily
|
||||
#' seasonality plot. 0 (default) starts the week on Sunday. 1 shifts by 1 day
|
||||
#' to Monday, and so on.
|
||||
#'
|
||||
#' @return A ggplot2 plot.
|
||||
plot_daily <- function(m, uncertainty = TRUE, daily_start = 0) {
|
||||
# Compute weekly seasonality for a Sun-Sat sequence of dates.
|
||||
df.d <- data.frame(
|
||||
ds=seq(set_date('2017-01-01 00:00:00'), length.out=24, by = "hour") +
|
||||
daily_start, cap=1.)
|
||||
df.d <- setup_dataframe(m, df.d)$df
|
||||
seas <- predict_seasonal_components(m, df.d)
|
||||
seas$hod <- factor(get_hour(df.d$ds), levels=get_hour(df.d$ds))
|
||||
|
||||
gg.daily <- ggplot2::ggplot(seas, ggplot2::aes(x = hod, y = daily,
|
||||
group = 1)) +
|
||||
ggplot2::geom_line(color = "#0072B2", na.rm = TRUE) +
|
||||
ggplot2::labs(x = "Hour of day")
|
||||
if (uncertainty) {
|
||||
gg.daily <- gg.daily +
|
||||
ggplot2::geom_ribbon(ggplot2::aes(ymin = daily_lower,
|
||||
ymax = daily_upper),
|
||||
alpha = 0.2,
|
||||
fill = "#0072B2",
|
||||
na.rm = TRUE)
|
||||
}
|
||||
return(gg.daily)
|
||||
}
|
||||
|
||||
#' Plot the weekly component of the forecast.
|
||||
#'
|
||||
#' @param m Prophet model object
|
||||
|
|
@ -1327,7 +1299,8 @@ plot_yearly <- function(m, uncertainty = TRUE, yearly_start = 0) {
|
|||
gg.yearly <- ggplot2::ggplot(seas, ggplot2::aes(x = ds, y = yearly,
|
||||
group = 1)) +
|
||||
ggplot2::geom_line(color = "#0072B2", na.rm = TRUE) +
|
||||
ggplot2::labs(x = "Day of year")
|
||||
ggplot2::labs(x = "Day of year") +
|
||||
ggplot2::scale_x_datetime(labels = scales::date_format('%B %d'))
|
||||
if (uncertainty) {
|
||||
gg.yearly <- gg.yearly +
|
||||
ggplot2::geom_ribbon(ggplot2::aes(ymin = yearly_lower,
|
||||
|
|
@ -1351,15 +1324,25 @@ plot_seasonality <- function(m, name, uncertainty = TRUE) {
|
|||
start <- set_date('2017-01-01')
|
||||
period <- m$seasonalities[[name]][1]
|
||||
end <- start + period * 24 * 3600
|
||||
plot.points <- as.numeric(difftime(end, start))
|
||||
plot.points <- 200
|
||||
df.y <- data.frame(
|
||||
ds=seq(from=start, by='d', length.out=plot.points), cap=1.)
|
||||
ds=seq(from=start, to=end, length.out=plot.points), cap=1.)
|
||||
df.y <- setup_dataframe(m, df.y)$df
|
||||
seas <- predict_seasonal_components(m, df.y)
|
||||
seas$ds <- df.y$ds
|
||||
gg.s <- ggplot2::ggplot(
|
||||
seas, ggplot2::aes_string(x = 'ds', y = name, group = 1)) +
|
||||
ggplot2::geom_line(color = "#0072B2", na.rm = TRUE)
|
||||
if (period <= 2) {
|
||||
fmt.str <- '%T'
|
||||
}
|
||||
else if (period < 14) {
|
||||
fmt.str <- '%m/%d %R'
|
||||
} else {
|
||||
fmt.str <- '%m/%d'
|
||||
}
|
||||
gg.s <- gg.s +
|
||||
ggplot2::scale_x_datetime(labels = scales::date_format(fmt.str))
|
||||
if (uncertainty) {
|
||||
gg.s <- gg.s +
|
||||
ggplot2::geom_ribbon(
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
\alias{make_future_dataframe}
|
||||
\title{Make dataframe with future dates for forecasting.}
|
||||
\usage{
|
||||
make_future_dataframe(m, periods, freq = "d", include_history = TRUE)
|
||||
make_future_dataframe(m, periods, freq = "day", include_history = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{m}{Prophet model object.}
|
||||
|
||||
\item{periods}{Int number of periods to forecast forward.}
|
||||
|
||||
\item{freq}{'day', 'week', 'month', 'quarter', or 'year'.}
|
||||
\item{freq}{'day', 'week', 'month', 'quarter', 'year', 1(1 sec), 60(1 minute) or 3600(1 hour).}
|
||||
|
||||
\item{include_history}{Boolean to include the historical dates in the data
|
||||
frame for predictions.}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
\usage{
|
||||
prophet(df = NULL, growth = "linear", changepoints = NULL,
|
||||
n.changepoints = 25, yearly.seasonality = "auto",
|
||||
weekly.seasonality = "auto", holidays = NULL,
|
||||
seasonality.prior.scale = 10, holidays.prior.scale = 10,
|
||||
changepoint.prior.scale = 0.05, mcmc.samples = 0, interval.width = 0.8,
|
||||
uncertainty.samples = 1000, fit = TRUE, ...)
|
||||
weekly.seasonality = "auto", daily.seasonality = "auto",
|
||||
holidays = NULL, seasonality.prior.scale = 10,
|
||||
holidays.prior.scale = 10, changepoint.prior.scale = 0.05,
|
||||
mcmc.samples = 0, interval.width = 0.8, uncertainty.samples = 1000,
|
||||
fit = TRUE, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{df}{(optional) Dataframe containing the history. Must have columns ds
|
||||
|
|
@ -36,6 +37,9 @@ FALSE, or a number of Fourier terms to generate.}
|
|||
\item{weekly.seasonality}{Fit weekly seasonality. Can be 'auto', TRUE,
|
||||
FALSE, or a number of Fourier terms to generate.}
|
||||
|
||||
\item{daily.seasonality}{Fit daily seasonality. Can be 'auto', TRUE,
|
||||
FALSE, or a number of Fourier terms to generate.}
|
||||
|
||||
\item{holidays}{data frame with columns holiday (character) and ds (date
|
||||
type)and optionally columns lower_window and upper_window which specify a
|
||||
range of days around the date to be included as holidays. lower_window=-2
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ The prophet model with seasonalities set.
|
|||
Turns on yearly seasonality if there is >=2 years of history.
|
||||
Turns on weekly seasonality if there is >=2 weeks of history, and the
|
||||
spacing between dates in the history is <7 days.
|
||||
Turns on daily seasonality if there is >=2 days of history, and the spacing
|
||||
between dates in the history is <1 day.
|
||||
}
|
||||
|
|
|
|||
19
R/man/set_date.Rd
Normal file
19
R/man/set_date.Rd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/prophet.R
|
||||
\name{set_date}
|
||||
\alias{set_date}
|
||||
\title{Convert date vector}
|
||||
\usage{
|
||||
set_date(ds = NULL, tz = "GMT")
|
||||
}
|
||||
\arguments{
|
||||
\item{ds}{Date vector, can be consisted of characters}
|
||||
|
||||
\item{tz}{string time zone}
|
||||
}
|
||||
\value{
|
||||
vector of POSIXct object converted from date
|
||||
}
|
||||
\description{
|
||||
Convert the date to POSIXct object
|
||||
}
|
||||
21
R/man/time_diff.Rd
Normal file
21
R/man/time_diff.Rd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/prophet.R
|
||||
\name{time_diff}
|
||||
\alias{time_diff}
|
||||
\title{Time difference between datetimes}
|
||||
\usage{
|
||||
time_diff(ds1, ds2, units = "days")
|
||||
}
|
||||
\arguments{
|
||||
\item{ds1}{POSIXct object}
|
||||
|
||||
\item{ds2}{POSIXct object}
|
||||
|
||||
\item{units}{string units of difference, e.g. 'days' or 'secs'.}
|
||||
}
|
||||
\value{
|
||||
numeric time difference
|
||||
}
|
||||
\description{
|
||||
Compute time difference of two POSIXct objects
|
||||
}
|
||||
864
R/tests/testthat/data2.csv
Normal file
864
R/tests/testthat/data2.csv
Normal file
|
|
@ -0,0 +1,864 @@
|
|||
ds,y
|
||||
2017-01-01 00:05:00,0.0
|
||||
2017-01-01 00:10:00,0.0
|
||||
2017-01-01 00:15:00,0.0
|
||||
2017-01-01 00:20:00,0.0
|
||||
2017-01-01 00:25:00,-0.1
|
||||
2017-01-01 00:30:00,-0.1
|
||||
2017-01-01 00:35:00,-0.1
|
||||
2017-01-01 00:40:00,-0.1
|
||||
2017-01-01 00:45:00,-0.1
|
||||
2017-01-01 00:50:00,-0.1
|
||||
2017-01-01 00:55:00,-0.3
|
||||
2017-01-01 01:00:00,-0.2
|
||||
2017-01-01 01:05:00,-0.3
|
||||
2017-01-01 01:10:00,-0.4
|
||||
2017-01-01 01:15:00,-0.4
|
||||
2017-01-01 01:20:00,-0.3
|
||||
2017-01-01 01:25:00,-0.3
|
||||
2017-01-01 01:30:00,-0.2
|
||||
2017-01-01 01:35:00,-0.3
|
||||
2017-01-01 01:40:00,-0.3
|
||||
2017-01-01 01:45:00,-0.3
|
||||
2017-01-01 01:50:00,-0.3
|
||||
2017-01-01 01:55:00,-0.3
|
||||
2017-01-01 02:00:00,-0.3
|
||||
2017-01-01 02:05:00,-0.3
|
||||
2017-01-01 02:10:00,-0.3
|
||||
2017-01-01 02:15:00,-0.3
|
||||
2017-01-01 02:20:00,-0.3
|
||||
2017-01-01 02:25:00,-0.3
|
||||
2017-01-01 02:30:00,-0.3
|
||||
2017-01-01 02:35:00,-0.3
|
||||
2017-01-01 02:40:00,-0.3
|
||||
2017-01-01 02:45:00,-0.3
|
||||
2017-01-01 02:50:00,-0.3
|
||||
2017-01-01 02:55:00,-0.3
|
||||
2017-01-01 03:00:00,-0.3
|
||||
2017-01-01 03:05:00,-0.3
|
||||
2017-01-01 03:10:00,-0.3
|
||||
2017-01-01 03:15:00,-0.3
|
||||
2017-01-01 03:20:00,-0.3
|
||||
2017-01-01 03:25:00,-0.4
|
||||
2017-01-01 03:30:00,-0.6
|
||||
2017-01-01 03:35:00,-0.4
|
||||
2017-01-01 03:40:00,-0.3
|
||||
2017-01-01 03:45:00,-0.4
|
||||
2017-01-01 03:50:00,-0.7
|
||||
2017-01-01 03:55:00,-0.8
|
||||
2017-01-01 04:00:00,-0.4
|
||||
2017-01-01 04:05:00,-0.3
|
||||
2017-01-01 04:10:00,-0.4
|
||||
2017-01-01 04:15:00,-0.4
|
||||
2017-01-01 04:20:00,-0.4
|
||||
2017-01-01 04:25:00,-0.5
|
||||
2017-01-01 04:30:00,-0.5
|
||||
2017-01-01 04:35:00,-0.5
|
||||
2017-01-01 04:40:00,-0.4
|
||||
2017-01-01 04:45:00,-0.5
|
||||
2017-01-01 04:50:00,-0.5
|
||||
2017-01-01 04:55:00,-0.5
|
||||
2017-01-01 05:00:00,-0.6
|
||||
2017-01-01 05:05:00,-0.9
|
||||
2017-01-01 05:10:00,-0.9
|
||||
2017-01-01 05:15:00,-1.2
|
||||
2017-01-01 05:20:00,-1.4
|
||||
2017-01-01 05:25:00,-1.8
|
||||
2017-01-01 05:30:00,-2.0
|
||||
2017-01-01 05:35:00,-2.2
|
||||
2017-01-01 05:40:00,-1.6
|
||||
2017-01-01 05:45:00,-1.2
|
||||
2017-01-01 05:50:00,-1.2
|
||||
2017-01-01 05:55:00,-1.4
|
||||
2017-01-01 06:00:00,-1.2
|
||||
2017-01-01 06:05:00,-0.9
|
||||
2017-01-01 06:10:00,-0.9
|
||||
2017-01-01 06:15:00,-0.9
|
||||
2017-01-01 06:20:00,-0.9
|
||||
2017-01-01 06:25:00,-0.9
|
||||
2017-01-01 06:30:00,-1.2
|
||||
2017-01-01 06:35:00,-1.1
|
||||
2017-01-01 06:40:00,-1.2
|
||||
2017-01-01 06:45:00,-1.3
|
||||
2017-01-01 06:50:00,-1.4
|
||||
2017-01-01 06:55:00,-1.7
|
||||
2017-01-01 07:00:00,-1.7
|
||||
2017-01-01 07:05:00,-1.7
|
||||
2017-01-01 07:10:00,-1.8
|
||||
2017-01-01 07:15:00,-2.4
|
||||
2017-01-01 07:20:00,-2.9
|
||||
2017-01-01 07:25:00,-3.2
|
||||
2017-01-01 07:30:00,-3.4
|
||||
2017-01-01 07:35:00,-3.6
|
||||
2017-01-01 07:40:00,-3.6
|
||||
2017-01-01 07:45:00,-3.5
|
||||
2017-01-01 07:50:00,-3.5
|
||||
2017-01-01 07:55:00,-3.5
|
||||
2017-01-01 08:00:00,-3.6
|
||||
2017-01-01 08:05:00,-3.7
|
||||
2017-01-01 08:10:00,-3.6
|
||||
2017-01-01 08:15:00,-3.6
|
||||
2017-01-01 08:20:00,-3.8
|
||||
2017-01-01 08:25:00,-4.0
|
||||
2017-01-01 08:30:00,-3.9
|
||||
2017-01-01 08:35:00,-3.9
|
||||
2017-01-01 08:40:00,-4.1
|
||||
2017-01-01 08:45:00,-4.0
|
||||
2017-01-01 08:50:00,-4.1
|
||||
2017-01-01 08:55:00,-4.1
|
||||
2017-01-01 09:00:00,-4.2
|
||||
2017-01-01 09:05:00,-4.1
|
||||
2017-01-01 09:10:00,-4.2
|
||||
2017-01-01 09:15:00,-4.1
|
||||
2017-01-01 09:20:00,-4.0
|
||||
2017-01-01 09:25:00,-4.0
|
||||
2017-01-01 09:30:00,-4.0
|
||||
2017-01-01 09:35:00,-4.1
|
||||
2017-01-01 09:40:00,-4.1
|
||||
2017-01-01 09:45:00,-4.2
|
||||
2017-01-01 09:50:00,-4.3
|
||||
2017-01-01 09:55:00,-4.4
|
||||
2017-01-01 10:00:00,-4.5
|
||||
2017-01-01 10:05:00,-4.6
|
||||
2017-01-01 10:10:00,-4.7
|
||||
2017-01-01 10:15:00,-4.6
|
||||
2017-01-01 10:20:00,-4.6
|
||||
2017-01-01 10:25:00,-4.6
|
||||
2017-01-01 10:30:00,-4.5
|
||||
2017-01-01 10:35:00,-4.6
|
||||
2017-01-01 10:40:00,-4.6
|
||||
2017-01-01 10:45:00,-4.6
|
||||
2017-01-01 10:50:00,-4.6
|
||||
2017-01-01 10:55:00,-4.7
|
||||
2017-01-01 11:00:00,-4.7
|
||||
2017-01-01 11:05:00,-4.6
|
||||
2017-01-01 11:10:00,-4.5
|
||||
2017-01-01 11:15:00,-4.7
|
||||
2017-01-01 11:20:00,-4.7
|
||||
2017-01-01 11:25:00,-4.8
|
||||
2017-01-01 11:30:00,-4.8
|
||||
2017-01-01 11:35:00,-4.8
|
||||
2017-01-01 11:40:00,-4.8
|
||||
2017-01-01 11:45:00,-4.7
|
||||
2017-01-01 11:50:00,-4.6
|
||||
2017-01-01 11:55:00,-4.6
|
||||
2017-01-01 12:00:00,-4.8
|
||||
2017-01-01 12:05:00,-4.9
|
||||
2017-01-01 12:10:00,-4.9
|
||||
2017-01-01 12:15:00,-4.9
|
||||
2017-01-01 12:20:00,-5.0
|
||||
2017-01-01 12:25:00,-4.9
|
||||
2017-01-01 12:30:00,-4.9
|
||||
2017-01-01 12:35:00,-5.0
|
||||
2017-01-01 12:40:00,-5.1
|
||||
2017-01-01 12:45:00,-5.3
|
||||
2017-01-01 12:50:00,-5.5
|
||||
2017-01-01 12:55:00,-5.7
|
||||
2017-01-01 13:00:00,-5.8
|
||||
2017-01-01 13:05:00,-5.9
|
||||
2017-01-01 13:10:00,-5.9
|
||||
2017-01-01 13:15:00,-6.1
|
||||
2017-01-01 13:20:00,-6.1
|
||||
2017-01-01 13:25:00,-6.1
|
||||
2017-01-01 13:30:00,-6.2
|
||||
2017-01-01 13:35:00,-6.3
|
||||
2017-01-01 13:40:00,-6.4
|
||||
2017-01-01 13:45:00,-6.5
|
||||
2017-01-01 13:50:00,-6.6
|
||||
2017-01-01 13:55:00,-6.7
|
||||
2017-01-01 14:00:00,-6.7
|
||||
2017-01-01 14:05:00,-6.7
|
||||
2017-01-01 14:10:00,-6.6
|
||||
2017-01-01 14:15:00,-6.7
|
||||
2017-01-01 14:20:00,-6.7
|
||||
2017-01-01 14:25:00,-6.6
|
||||
2017-01-01 14:30:00,-6.7
|
||||
2017-01-01 14:35:00,-6.6
|
||||
2017-01-01 14:40:00,-6.6
|
||||
2017-01-01 14:45:00,-6.4
|
||||
2017-01-01 14:50:00,-6.5
|
||||
2017-01-01 14:55:00,-6.5
|
||||
2017-01-01 15:00:00,-6.4
|
||||
2017-01-01 15:05:00,-6.4
|
||||
2017-01-01 15:10:00,-6.3
|
||||
2017-01-01 15:15:00,-6.3
|
||||
2017-01-01 15:20:00,-6.4
|
||||
2017-01-01 15:25:00,-6.5
|
||||
2017-01-01 15:30:00,-6.6
|
||||
2017-01-01 15:35:00,-6.6
|
||||
2017-01-01 15:40:00,-6.6
|
||||
2017-01-01 15:45:00,-6.6
|
||||
2017-01-01 15:50:00,-6.5
|
||||
2017-01-01 15:55:00,-6.4
|
||||
2017-01-01 16:00:00,-6.3
|
||||
2017-01-01 16:05:00,-6.3
|
||||
2017-01-01 16:10:00,-6.2
|
||||
2017-01-01 16:15:00,-6.1
|
||||
2017-01-01 16:20:00,-6.0
|
||||
2017-01-01 16:25:00,-5.9
|
||||
2017-01-01 16:30:00,-5.8
|
||||
2017-01-01 16:35:00,-5.7
|
||||
2017-01-01 16:40:00,-5.4
|
||||
2017-01-01 16:45:00,-5.3
|
||||
2017-01-01 16:50:00,-5.1
|
||||
2017-01-01 16:55:00,-5.0
|
||||
2017-01-01 17:00:00,-4.8
|
||||
2017-01-01 17:05:00,-4.6
|
||||
2017-01-01 17:10:00,-4.3
|
||||
2017-01-01 17:15:00,-4.1
|
||||
2017-01-01 17:20:00,-3.9
|
||||
2017-01-01 17:25:00,-3.6
|
||||
2017-01-01 17:30:00,-3.3
|
||||
2017-01-01 17:35:00,-3.1
|
||||
2017-01-01 17:40:00,-2.8
|
||||
2017-01-01 17:45:00,-2.7
|
||||
2017-01-01 17:50:00,-2.4
|
||||
2017-01-01 17:55:00,-2.0
|
||||
2017-01-01 18:00:00,-1.6
|
||||
2017-01-01 18:05:00,-1.3
|
||||
2017-01-01 18:10:00,-1.1
|
||||
2017-01-01 18:15:00,-0.9
|
||||
2017-01-01 18:20:00,-0.7
|
||||
2017-01-01 18:25:00,-0.4
|
||||
2017-01-01 18:30:00,-0.4
|
||||
2017-01-01 18:35:00,-0.2
|
||||
2017-01-01 18:40:00,0.0
|
||||
2017-01-01 18:45:00,0.3
|
||||
2017-01-01 18:50:00,0.6
|
||||
2017-01-01 18:55:00,0.6
|
||||
2017-01-01 19:00:00,1.0
|
||||
2017-01-01 19:05:00,1.0
|
||||
2017-01-01 19:10:00,1.1
|
||||
2017-01-01 19:15:00,1.3
|
||||
2017-01-01 19:20:00,1.0
|
||||
2017-01-01 19:25:00,1.2
|
||||
2017-01-01 19:30:00,1.3
|
||||
2017-01-01 19:35:00,0.9
|
||||
2017-01-01 19:40:00,1.1
|
||||
2017-01-01 19:45:00,1.3
|
||||
2017-01-01 19:50:00,1.5
|
||||
2017-01-01 19:55:00,1.3
|
||||
2017-01-01 20:00:00,1.6
|
||||
2017-01-01 20:05:00,1.6
|
||||
2017-01-01 20:10:00,1.8
|
||||
2017-01-01 20:15:00,1.4
|
||||
2017-01-01 20:20:00,1.4
|
||||
2017-01-01 20:25:00,1.6
|
||||
2017-01-01 20:30:00,1.6
|
||||
2017-01-01 20:35:00,1.5
|
||||
2017-01-01 20:40:00,1.5
|
||||
2017-01-01 20:45:00,1.8
|
||||
2017-01-01 20:50:00,1.6
|
||||
2017-01-01 20:55:00,1.7
|
||||
2017-01-01 21:00:00,1.5
|
||||
2017-01-01 21:05:00,1.8
|
||||
2017-01-01 21:10:00,1.6
|
||||
2017-01-01 21:15:00,1.7
|
||||
2017-01-01 21:20:00,1.9
|
||||
2017-01-01 21:25:00,1.6
|
||||
2017-01-01 21:30:00,1.8
|
||||
2017-01-01 21:35:00,1.8
|
||||
2017-01-01 21:40:00,1.5
|
||||
2017-01-01 21:45:00,1.6
|
||||
2017-01-01 21:50:00,1.6
|
||||
2017-01-01 21:55:00,1.4
|
||||
2017-01-01 22:00:00,1.1
|
||||
2017-01-01 22:05:00,1.5
|
||||
2017-01-01 22:10:00,1.5
|
||||
2017-01-01 22:15:00,1.6
|
||||
2017-01-01 22:20:00,1.5
|
||||
2017-01-01 22:25:00,1.1
|
||||
2017-01-01 22:30:00,1.0
|
||||
2017-01-01 22:35:00,1.0
|
||||
2017-01-01 22:40:00,1.1
|
||||
2017-01-01 22:45:00,1.1
|
||||
2017-01-01 22:50:00,0.7
|
||||
2017-01-01 22:55:00,0.6
|
||||
2017-01-01 23:00:00,0.5
|
||||
2017-01-01 23:05:00,0.3
|
||||
2017-01-01 23:10:00,0.5
|
||||
2017-01-01 23:15:00,0.2
|
||||
2017-01-01 23:20:00,0.2
|
||||
2017-01-01 23:25:00,0.0
|
||||
2017-01-01 23:30:00,-0.2
|
||||
2017-01-01 23:35:00,-0.3
|
||||
2017-01-01 23:40:00,-0.5
|
||||
2017-01-01 23:45:00,-0.7
|
||||
2017-01-01 23:50:00,-1.1
|
||||
2017-01-01 23:55:00,-1.3
|
||||
2017-01-02 00:00:00,-1.4
|
||||
2017-01-02 00:05:00,-1.7
|
||||
2017-01-02 00:10:00,-2.1
|
||||
2017-01-02 00:15:00,-2.4
|
||||
2017-01-02 00:20:00,-2.6
|
||||
2017-01-02 00:25:00,-2.9
|
||||
2017-01-02 00:30:00,-3.2
|
||||
2017-01-02 00:35:00,-3.5
|
||||
2017-01-02 00:40:00,-3.9
|
||||
2017-01-02 00:45:00,-4.1
|
||||
2017-01-02 00:50:00,-4.2
|
||||
2017-01-02 00:55:00,-4.4
|
||||
2017-01-02 01:00:00,-4.6
|
||||
2017-01-02 01:05:00,-4.7
|
||||
2017-01-02 01:10:00,-5.0
|
||||
2017-01-02 01:15:00,-5.1
|
||||
2017-01-02 01:20:00,-4.8
|
||||
2017-01-02 01:25:00,-4.7
|
||||
2017-01-02 01:30:00,-4.5
|
||||
2017-01-02 01:35:00,-4.0
|
||||
2017-01-02 01:40:00,-3.6
|
||||
2017-01-02 01:45:00,-3.1
|
||||
2017-01-02 01:50:00,-3.0
|
||||
2017-01-02 01:55:00,-3.0
|
||||
2017-01-02 02:00:00,-3.0
|
||||
2017-01-02 02:05:00,-2.9
|
||||
2017-01-02 02:10:00,-3.0
|
||||
2017-01-02 02:15:00,-2.9
|
||||
2017-01-02 02:20:00,-3.0
|
||||
2017-01-02 02:25:00,-3.0
|
||||
2017-01-02 02:30:00,-3.0
|
||||
2017-01-02 02:35:00,-3.0
|
||||
2017-01-02 02:40:00,-3.2
|
||||
2017-01-02 02:45:00,-3.5
|
||||
2017-01-02 02:50:00,-3.7
|
||||
2017-01-02 02:55:00,-3.5
|
||||
2017-01-02 03:00:00,-3.5
|
||||
2017-01-02 03:05:00,-3.4
|
||||
2017-01-02 03:10:00,-3.3
|
||||
2017-01-02 03:15:00,-3.2
|
||||
2017-01-02 03:20:00,-3.2
|
||||
2017-01-02 03:25:00,-3.3
|
||||
2017-01-02 03:30:00,-3.3
|
||||
2017-01-02 03:35:00,-3.3
|
||||
2017-01-02 03:40:00,-3.4
|
||||
2017-01-02 03:45:00,-3.4
|
||||
2017-01-02 03:50:00,-3.4
|
||||
2017-01-02 03:55:00,-3.5
|
||||
2017-01-02 04:00:00,-3.5
|
||||
2017-01-02 04:05:00,-3.5
|
||||
2017-01-02 04:10:00,-3.5
|
||||
2017-01-02 04:15:00,-3.6
|
||||
2017-01-02 04:20:00,-3.6
|
||||
2017-01-02 04:25:00,-3.8
|
||||
2017-01-02 04:30:00,-3.8
|
||||
2017-01-02 04:35:00,-3.8
|
||||
2017-01-02 04:40:00,-3.9
|
||||
2017-01-02 04:45:00,-3.9
|
||||
2017-01-02 04:50:00,-3.9
|
||||
2017-01-02 04:55:00,-3.9
|
||||
2017-01-02 05:00:00,-3.9
|
||||
2017-01-02 05:05:00,-3.9
|
||||
2017-01-02 05:10:00,-3.9
|
||||
2017-01-02 05:15:00,-4.0
|
||||
2017-01-02 05:20:00,-3.9
|
||||
2017-01-02 05:25:00,-4.0
|
||||
2017-01-02 05:30:00,-4.2
|
||||
2017-01-02 05:35:00,-4.2
|
||||
2017-01-02 05:40:00,-4.4
|
||||
2017-01-02 05:45:00,-4.4
|
||||
2017-01-02 05:50:00,-4.4
|
||||
2017-01-02 05:55:00,-4.4
|
||||
2017-01-02 06:00:00,-4.4
|
||||
2017-01-02 06:05:00,-5.3
|
||||
2017-01-02 06:10:00,-5.2
|
||||
2017-01-02 06:15:00,-5.3
|
||||
2017-01-02 06:20:00,-5.2
|
||||
2017-01-02 06:25:00,-5.0
|
||||
2017-01-02 06:30:00,-4.9
|
||||
2017-01-02 06:35:00,-4.8
|
||||
2017-01-02 06:40:00,-4.8
|
||||
2017-01-02 06:45:00,-4.7
|
||||
2017-01-02 06:50:00,-4.7
|
||||
2017-01-02 06:55:00,-4.8
|
||||
2017-01-02 07:00:00,-4.7
|
||||
2017-01-02 07:05:00,-4.7
|
||||
2017-01-02 07:10:00,-4.7
|
||||
2017-01-02 07:15:00,-5.0
|
||||
2017-01-02 07:20:00,-5.0
|
||||
2017-01-02 07:25:00,-4.9
|
||||
2017-01-02 07:30:00,-4.8
|
||||
2017-01-02 07:35:00,-4.8
|
||||
2017-01-02 07:40:00,-4.7
|
||||
2017-01-02 07:45:00,-4.6
|
||||
2017-01-02 07:50:00,-4.6
|
||||
2017-01-02 07:55:00,-4.7
|
||||
2017-01-02 08:00:00,-4.6
|
||||
2017-01-02 08:05:00,-4.6
|
||||
2017-01-02 08:10:00,-4.5
|
||||
2017-01-02 08:15:00,-4.5
|
||||
2017-01-02 08:20:00,-4.5
|
||||
2017-01-02 08:25:00,-4.5
|
||||
2017-01-02 08:30:00,-4.5
|
||||
2017-01-02 08:35:00,-4.5
|
||||
2017-01-02 08:40:00,-4.6
|
||||
2017-01-02 08:45:00,-4.6
|
||||
2017-01-02 08:50:00,-4.6
|
||||
2017-01-02 08:55:00,-4.6
|
||||
2017-01-02 09:00:00,-4.6
|
||||
2017-01-02 09:05:00,-4.6
|
||||
2017-01-02 09:10:00,-4.5
|
||||
2017-01-02 09:15:00,-4.5
|
||||
2017-01-02 09:20:00,-4.5
|
||||
2017-01-02 09:25:00,-4.5
|
||||
2017-01-02 09:30:00,-4.5
|
||||
2017-01-02 09:35:00,-4.5
|
||||
2017-01-02 09:40:00,-4.5
|
||||
2017-01-02 09:45:00,-4.5
|
||||
2017-01-02 09:50:00,-4.4
|
||||
2017-01-02 09:55:00,-4.4
|
||||
2017-01-02 10:00:00,-4.4
|
||||
2017-01-02 10:05:00,-4.5
|
||||
2017-01-02 10:10:00,-4.5
|
||||
2017-01-02 10:15:00,-4.4
|
||||
2017-01-02 10:20:00,-4.5
|
||||
2017-01-02 10:25:00,-4.5
|
||||
2017-01-02 10:30:00,-4.5
|
||||
2017-01-02 10:35:00,-4.5
|
||||
2017-01-02 10:40:00,-4.5
|
||||
2017-01-02 10:45:00,-4.5
|
||||
2017-01-02 10:50:00,-4.5
|
||||
2017-01-02 10:55:00,-4.4
|
||||
2017-01-02 11:00:00,-4.4
|
||||
2017-01-02 11:05:00,-4.5
|
||||
2017-01-02 11:10:00,-4.5
|
||||
2017-01-02 11:15:00,-4.5
|
||||
2017-01-02 11:20:00,-4.5
|
||||
2017-01-02 11:25:00,-4.5
|
||||
2017-01-02 11:30:00,-4.5
|
||||
2017-01-02 11:35:00,-4.5
|
||||
2017-01-02 11:40:00,-4.5
|
||||
2017-01-02 11:45:00,-4.6
|
||||
2017-01-02 11:50:00,-4.6
|
||||
2017-01-02 11:55:00,-4.6
|
||||
2017-01-02 12:00:00,-4.6
|
||||
2017-01-02 12:05:00,-4.7
|
||||
2017-01-02 12:10:00,-4.8
|
||||
2017-01-02 12:15:00,-4.8
|
||||
2017-01-02 12:20:00,-4.9
|
||||
2017-01-02 12:25:00,-5.0
|
||||
2017-01-02 12:30:00,-5.3
|
||||
2017-01-02 12:35:00,-5.5
|
||||
2017-01-02 12:40:00,-5.5
|
||||
2017-01-02 12:45:00,-5.6
|
||||
2017-01-02 12:50:00,-5.9
|
||||
2017-01-02 12:55:00,-6.1
|
||||
2017-01-02 13:00:00,-6.0
|
||||
2017-01-02 13:05:00,-6.1
|
||||
2017-01-02 13:10:00,-6.1
|
||||
2017-01-02 13:15:00,-6.0
|
||||
2017-01-02 13:20:00,-5.7
|
||||
2017-01-02 13:25:00,-5.5
|
||||
2017-01-02 13:30:00,-5.3
|
||||
2017-01-02 13:35:00,-5.2
|
||||
2017-01-02 13:40:00,-5.1
|
||||
2017-01-02 13:45:00,-5.0
|
||||
2017-01-02 13:50:00,-5.0
|
||||
2017-01-02 13:55:00,-5.0
|
||||
2017-01-02 14:00:00,-4.9
|
||||
2017-01-02 14:05:00,-4.9
|
||||
2017-01-02 14:10:00,-5.0
|
||||
2017-01-02 14:15:00,-4.9
|
||||
2017-01-02 14:20:00,-4.9
|
||||
2017-01-02 14:25:00,-4.9
|
||||
2017-01-02 14:30:00,-4.9
|
||||
2017-01-02 14:35:00,-4.9
|
||||
2017-01-02 14:40:00,-5.0
|
||||
2017-01-02 14:45:00,-4.9
|
||||
2017-01-02 14:50:00,-4.9
|
||||
2017-01-02 14:55:00,-5.0
|
||||
2017-01-02 15:00:00,-4.9
|
||||
2017-01-02 15:05:00,-4.9
|
||||
2017-01-02 15:10:00,-4.9
|
||||
2017-01-02 15:15:00,-4.9
|
||||
2017-01-02 15:20:00,-4.9
|
||||
2017-01-02 15:25:00,-4.9
|
||||
2017-01-02 15:30:00,-4.9
|
||||
2017-01-02 15:35:00,-4.9
|
||||
2017-01-02 15:40:00,-4.9
|
||||
2017-01-02 15:45:00,-4.9
|
||||
2017-01-02 15:50:00,-4.9
|
||||
2017-01-02 15:55:00,-4.9
|
||||
2017-01-02 16:00:00,-4.9
|
||||
2017-01-02 16:05:00,-4.9
|
||||
2017-01-02 16:10:00,-4.9
|
||||
2017-01-02 16:15:00,-4.9
|
||||
2017-01-02 16:20:00,-4.9
|
||||
2017-01-02 16:25:00,-4.8
|
||||
2017-01-02 16:30:00,-4.8
|
||||
2017-01-02 16:35:00,-4.7
|
||||
2017-01-02 16:40:00,-4.8
|
||||
2017-01-02 16:45:00,-4.8
|
||||
2017-01-02 16:50:00,-4.8
|
||||
2017-01-02 16:55:00,-4.9
|
||||
2017-01-02 17:00:00,-4.8
|
||||
2017-01-02 17:05:00,-4.8
|
||||
2017-01-02 17:10:00,-4.8
|
||||
2017-01-02 17:15:00,-4.8
|
||||
2017-01-02 17:20:00,-4.7
|
||||
2017-01-02 17:25:00,-4.7
|
||||
2017-01-02 17:30:00,-4.7
|
||||
2017-01-02 17:35:00,-4.7
|
||||
2017-01-02 17:40:00,-4.7
|
||||
2017-01-02 17:45:00,-4.6
|
||||
2017-01-02 17:50:00,-4.7
|
||||
2017-01-02 17:55:00,-4.7
|
||||
2017-01-02 18:00:00,-4.5
|
||||
2017-01-02 18:05:00,-4.6
|
||||
2017-01-02 18:10:00,-4.5
|
||||
2017-01-02 18:15:00,-4.4
|
||||
2017-01-02 18:20:00,-4.6
|
||||
2017-01-02 18:25:00,-4.6
|
||||
2017-01-02 18:30:00,-4.5
|
||||
2017-01-02 18:35:00,-4.4
|
||||
2017-01-02 18:40:00,-4.4
|
||||
2017-01-02 18:45:00,-4.4
|
||||
2017-01-02 18:50:00,-4.3
|
||||
2017-01-02 18:55:00,-4.2
|
||||
2017-01-02 19:00:00,-4.2
|
||||
2017-01-02 19:05:00,-4.2
|
||||
2017-01-02 19:10:00,-4.2
|
||||
2017-01-02 19:15:00,-4.1
|
||||
2017-01-02 19:20:00,-4.2
|
||||
2017-01-02 19:25:00,-4.2
|
||||
2017-01-02 19:30:00,-4.1
|
||||
2017-01-02 19:35:00,-3.9
|
||||
2017-01-02 19:40:00,-3.9
|
||||
2017-01-02 19:45:00,-4.1
|
||||
2017-01-02 19:50:00,-4.2
|
||||
2017-01-02 19:55:00,-4.0
|
||||
2017-01-02 20:00:00,-4.0
|
||||
2017-01-02 20:05:00,-4.1
|
||||
2017-01-02 20:10:00,-4.0
|
||||
2017-01-02 20:15:00,-4.1
|
||||
2017-01-02 20:20:00,-4.1
|
||||
2017-01-02 20:25:00,-4.0
|
||||
2017-01-02 20:30:00,-4.2
|
||||
2017-01-02 20:35:00,-4.1
|
||||
2017-01-02 20:40:00,-4.1
|
||||
2017-01-02 20:45:00,-4.2
|
||||
2017-01-02 20:50:00,-4.1
|
||||
2017-01-02 20:55:00,-4.3
|
||||
2017-01-02 21:00:00,-4.3
|
||||
2017-01-02 21:05:00,-4.4
|
||||
2017-01-02 21:10:00,-4.5
|
||||
2017-01-02 21:15:00,-4.4
|
||||
2017-01-02 21:20:00,-4.2
|
||||
2017-01-02 21:25:00,-4.5
|
||||
2017-01-02 21:30:00,-4.4
|
||||
2017-01-02 21:35:00,-4.2
|
||||
2017-01-02 21:40:00,-4.3
|
||||
2017-01-02 21:45:00,-4.3
|
||||
2017-01-02 21:50:00,-4.2
|
||||
2017-01-02 21:55:00,-4.2
|
||||
2017-01-02 22:00:00,-4.3
|
||||
2017-01-02 22:05:00,-4.2
|
||||
2017-01-02 22:10:00,-4.3
|
||||
2017-01-02 22:15:00,-4.4
|
||||
2017-01-02 22:20:00,-4.3
|
||||
2017-01-02 22:25:00,-4.3
|
||||
2017-01-02 22:30:00,-4.0
|
||||
2017-01-02 22:35:00,-4.3
|
||||
2017-01-02 22:40:00,-4.1
|
||||
2017-01-02 22:45:00,-4.2
|
||||
2017-01-02 22:50:00,-4.0
|
||||
2017-01-02 22:55:00,-3.9
|
||||
2017-01-02 23:00:00,-4.0
|
||||
2017-01-02 23:05:00,-4.1
|
||||
2017-01-02 23:10:00,-4.1
|
||||
2017-01-02 23:15:00,-4.0
|
||||
2017-01-02 23:20:00,-4.1
|
||||
2017-01-02 23:25:00,-4.2
|
||||
2017-01-02 23:30:00,-4.3
|
||||
2017-01-02 23:35:00,-4.2
|
||||
2017-01-02 23:40:00,-4.3
|
||||
2017-01-02 23:45:00,-4.3
|
||||
2017-01-02 23:50:00,-4.3
|
||||
2017-01-02 23:55:00,-4.4
|
||||
2017-01-03 00:00:00,-4.5
|
||||
2017-01-03 00:05:00,-4.5
|
||||
2017-01-03 00:10:00,-4.5
|
||||
2017-01-03 00:15:00,-4.5
|
||||
2017-01-03 00:20:00,-4.6
|
||||
2017-01-03 00:25:00,-4.6
|
||||
2017-01-03 00:30:00,-4.5
|
||||
2017-01-03 00:35:00,-4.6
|
||||
2017-01-03 00:40:00,-4.6
|
||||
2017-01-03 00:45:00,-4.5
|
||||
2017-01-03 00:50:00,-4.5
|
||||
2017-01-03 00:55:00,-4.6
|
||||
2017-01-03 01:00:00,-4.5
|
||||
2017-01-03 01:05:00,-4.6
|
||||
2017-01-03 01:10:00,-4.7
|
||||
2017-01-03 01:15:00,-4.7
|
||||
2017-01-03 01:20:00,-4.7
|
||||
2017-01-03 01:25:00,-4.9
|
||||
2017-01-03 01:30:00,-4.9
|
||||
2017-01-03 01:35:00,-4.9
|
||||
2017-01-03 01:40:00,-5.0
|
||||
2017-01-03 01:45:00,-5.0
|
||||
2017-01-03 01:50:00,-5.2
|
||||
2017-01-03 01:55:00,-5.2
|
||||
2017-01-03 02:00:00,-5.5
|
||||
2017-01-03 02:05:00,-5.3
|
||||
2017-01-03 02:10:00,-5.2
|
||||
2017-01-03 02:15:00,-5.2
|
||||
2017-01-03 02:20:00,-5.9
|
||||
2017-01-03 02:25:00,-6.4
|
||||
2017-01-03 02:30:00,-6.5
|
||||
2017-01-03 02:35:00,-6.0
|
||||
2017-01-03 02:40:00,-5.8
|
||||
2017-01-03 02:45:00,-5.5
|
||||
2017-01-03 02:50:00,-5.4
|
||||
2017-01-03 02:55:00,-5.5
|
||||
2017-01-03 03:00:00,-6.3
|
||||
2017-01-03 03:05:00,-6.3
|
||||
2017-01-03 03:10:00,-6.8
|
||||
2017-01-03 03:15:00,-6.3
|
||||
2017-01-03 03:20:00,-5.8
|
||||
2017-01-03 03:25:00,-6.8
|
||||
2017-01-03 03:30:00,-6.2
|
||||
2017-01-03 03:35:00,-5.7
|
||||
2017-01-03 03:40:00,-5.4
|
||||
2017-01-03 03:45:00,-5.3
|
||||
2017-01-03 03:50:00,-5.3
|
||||
2017-01-03 03:55:00,-5.2
|
||||
2017-01-03 04:00:00,-5.3
|
||||
2017-01-03 04:05:00,-5.3
|
||||
2017-01-03 04:10:00,-5.2
|
||||
2017-01-03 04:15:00,-5.2
|
||||
2017-01-03 04:20:00,-5.6
|
||||
2017-01-03 04:25:00,-6.1
|
||||
2017-01-03 04:30:00,-6.1
|
||||
2017-01-03 04:35:00,-6.1
|
||||
2017-01-03 04:40:00,-6.0
|
||||
2017-01-03 04:45:00,-5.8
|
||||
2017-01-03 04:50:00,-5.6
|
||||
2017-01-03 04:55:00,-5.7
|
||||
2017-01-03 05:00:00,-5.6
|
||||
2017-01-03 05:05:00,-6.1
|
||||
2017-01-03 05:10:00,-5.8
|
||||
2017-01-03 05:15:00,-5.9
|
||||
2017-01-03 05:20:00,-5.8
|
||||
2017-01-03 05:25:00,-6.3
|
||||
2017-01-03 05:30:00,-6.4
|
||||
2017-01-03 05:35:00,-6.5
|
||||
2017-01-03 05:40:00,-6.5
|
||||
2017-01-03 05:45:00,-5.9
|
||||
2017-01-03 05:50:00,-5.7
|
||||
2017-01-03 05:55:00,-5.8
|
||||
2017-01-03 06:00:00,-6.0
|
||||
2017-01-03 06:05:00,-6.3
|
||||
2017-01-03 06:10:00,-6.7
|
||||
2017-01-03 06:15:00,-6.6
|
||||
2017-01-03 06:20:00,-6.5
|
||||
2017-01-03 06:25:00,-6.4
|
||||
2017-01-03 06:30:00,-6.1
|
||||
2017-01-03 06:35:00,-6.3
|
||||
2017-01-03 06:40:00,-6.2
|
||||
2017-01-03 06:45:00,-6.1
|
||||
2017-01-03 06:50:00,-6.1
|
||||
2017-01-03 06:55:00,-6.0
|
||||
2017-01-03 07:00:00,-6.0
|
||||
2017-01-03 07:05:00,-6.2
|
||||
2017-01-03 07:10:00,-6.4
|
||||
2017-01-03 07:15:00,-6.2
|
||||
2017-01-03 07:20:00,-6.1
|
||||
2017-01-03 07:25:00,-5.9
|
||||
2017-01-03 07:30:00,-5.9
|
||||
2017-01-03 07:35:00,-5.9
|
||||
2017-01-03 07:40:00,-6.2
|
||||
2017-01-03 07:45:00,-6.4
|
||||
2017-01-03 07:50:00,-6.2
|
||||
2017-01-03 07:55:00,-6.0
|
||||
2017-01-03 08:00:00,-5.9
|
||||
2017-01-03 08:05:00,-5.9
|
||||
2017-01-03 08:10:00,-5.8
|
||||
2017-01-03 08:15:00,-5.8
|
||||
2017-01-03 08:20:00,-5.8
|
||||
2017-01-03 08:25:00,-5.8
|
||||
2017-01-03 08:30:00,-6.0
|
||||
2017-01-03 08:35:00,-5.9
|
||||
2017-01-03 08:40:00,-5.9
|
||||
2017-01-03 08:45:00,-5.8
|
||||
2017-01-03 08:50:00,-5.8
|
||||
2017-01-03 08:55:00,-5.7
|
||||
2017-01-03 09:00:00,-5.8
|
||||
2017-01-03 09:05:00,-5.8
|
||||
2017-01-03 09:10:00,-6.0
|
||||
2017-01-03 09:15:00,-6.1
|
||||
2017-01-03 09:20:00,-6.0
|
||||
2017-01-03 09:25:00,-5.9
|
||||
2017-01-03 09:30:00,-6.0
|
||||
2017-01-03 09:35:00,-6.0
|
||||
2017-01-03 09:40:00,-6.1
|
||||
2017-01-03 09:45:00,-6.2
|
||||
2017-01-03 09:50:00,-6.1
|
||||
2017-01-03 09:55:00,-6.3
|
||||
2017-01-03 10:00:00,-6.3
|
||||
2017-01-03 10:05:00,-6.1
|
||||
2017-01-03 10:10:00,-6.0
|
||||
2017-01-03 10:15:00,-5.9
|
||||
2017-01-03 10:20:00,-5.8
|
||||
2017-01-03 10:25:00,-5.7
|
||||
2017-01-03 10:30:00,-5.7
|
||||
2017-01-03 10:35:00,-5.8
|
||||
2017-01-03 10:40:00,-5.6
|
||||
2017-01-03 10:45:00,-5.6
|
||||
2017-01-03 10:50:00,-5.6
|
||||
2017-01-03 10:55:00,-5.6
|
||||
2017-01-03 11:00:00,-5.5
|
||||
2017-01-03 11:05:00,-5.6
|
||||
2017-01-03 11:10:00,-5.7
|
||||
2017-01-03 11:15:00,-5.7
|
||||
2017-01-03 11:20:00,-5.8
|
||||
2017-01-03 11:25:00,-5.7
|
||||
2017-01-03 11:30:00,-5.6
|
||||
2017-01-03 11:35:00,-5.5
|
||||
2017-01-03 11:40:00,-5.3
|
||||
2017-01-03 11:45:00,-5.2
|
||||
2017-01-03 11:50:00,-5.1
|
||||
2017-01-03 11:55:00,-5.0
|
||||
2017-01-03 12:00:00,-5.1
|
||||
2017-01-03 12:05:00,-5.0
|
||||
2017-01-03 12:10:00,-5.0
|
||||
2017-01-03 12:15:00,-5.0
|
||||
2017-01-03 12:20:00,-4.8
|
||||
2017-01-03 12:25:00,-4.8
|
||||
2017-01-03 12:30:00,-4.7
|
||||
2017-01-03 12:35:00,-4.6
|
||||
2017-01-03 12:40:00,-4.5
|
||||
2017-01-03 12:45:00,-4.4
|
||||
2017-01-03 12:50:00,-4.5
|
||||
2017-01-03 12:55:00,-4.6
|
||||
2017-01-03 13:00:00,-4.6
|
||||
2017-01-03 13:05:00,-4.6
|
||||
2017-01-03 13:10:00,-4.5
|
||||
2017-01-03 13:15:00,-4.5
|
||||
2017-01-03 13:20:00,-4.5
|
||||
2017-01-03 13:25:00,-4.3
|
||||
2017-01-03 13:30:00,-4.3
|
||||
2017-01-03 13:35:00,-4.3
|
||||
2017-01-03 13:40:00,-4.2
|
||||
2017-01-03 13:45:00,-4.2
|
||||
2017-01-03 13:50:00,-4.2
|
||||
2017-01-03 13:55:00,-4.2
|
||||
2017-01-03 14:00:00,-4.3
|
||||
2017-01-03 14:05:00,-4.3
|
||||
2017-01-03 14:10:00,-4.3
|
||||
2017-01-03 14:15:00,-4.3
|
||||
2017-01-03 14:20:00,-4.3
|
||||
2017-01-03 14:25:00,-4.3
|
||||
2017-01-03 14:30:00,-4.4
|
||||
2017-01-03 14:35:00,-4.4
|
||||
2017-01-03 14:40:00,-4.4
|
||||
2017-01-03 14:45:00,-4.5
|
||||
2017-01-03 14:50:00,-4.6
|
||||
2017-01-03 14:55:00,-4.5
|
||||
2017-01-03 15:00:00,-4.5
|
||||
2017-01-03 15:05:00,-4.5
|
||||
2017-01-03 15:10:00,-4.5
|
||||
2017-01-03 15:15:00,-4.5
|
||||
2017-01-03 15:20:00,-4.5
|
||||
2017-01-03 15:25:00,-4.5
|
||||
2017-01-03 15:30:00,-4.5
|
||||
2017-01-03 15:35:00,-4.5
|
||||
2017-01-03 15:40:00,-4.5
|
||||
2017-01-03 15:45:00,-4.6
|
||||
2017-01-03 15:50:00,-4.6
|
||||
2017-01-03 15:55:00,-4.5
|
||||
2017-01-03 16:00:00,-4.6
|
||||
2017-01-03 16:05:00,-4.5
|
||||
2017-01-03 16:10:00,-4.3
|
||||
2017-01-03 16:15:00,-4.2
|
||||
2017-01-03 16:20:00,-4.3
|
||||
2017-01-03 16:25:00,-4.2
|
||||
2017-01-03 16:30:00,-4.1
|
||||
2017-01-03 16:35:00,-4.0
|
||||
2017-01-03 16:40:00,-3.9
|
||||
2017-01-03 16:45:00,-3.8
|
||||
2017-01-03 16:50:00,-3.7
|
||||
2017-01-03 16:55:00,-3.7
|
||||
2017-01-03 17:00:00,-3.4
|
||||
2017-01-03 17:05:00,-3.3
|
||||
2017-01-03 17:10:00,-3.5
|
||||
2017-01-03 17:15:00,-3.4
|
||||
2017-01-03 17:20:00,-3.3
|
||||
2017-01-03 17:25:00,-3.2
|
||||
2017-01-03 17:30:00,-3.1
|
||||
2017-01-03 17:35:00,-3.0
|
||||
2017-01-03 17:40:00,-2.7
|
||||
2017-01-03 17:45:00,-2.6
|
||||
2017-01-03 17:50:00,-2.2
|
||||
2017-01-03 17:55:00,-2.4
|
||||
2017-01-03 18:00:00,-2.4
|
||||
2017-01-03 18:05:00,-2.7
|
||||
2017-01-03 18:10:00,-2.7
|
||||
2017-01-03 18:15:00,-2.6
|
||||
2017-01-03 18:20:00,-2.7
|
||||
2017-01-03 18:25:00,-2.5
|
||||
2017-01-03 18:30:00,-2.5
|
||||
2017-01-03 18:35:00,-2.6
|
||||
2017-01-03 18:40:00,-2.6
|
||||
2017-01-03 18:45:00,-2.6
|
||||
2017-01-03 18:50:00,-2.9
|
||||
2017-01-03 18:55:00,-2.7
|
||||
2017-01-03 19:00:00,-2.5
|
||||
2017-01-03 19:05:00,-2.3
|
||||
2017-01-03 19:10:00,-2.3
|
||||
2017-01-03 19:15:00,-2.3
|
||||
2017-01-03 19:20:00,-2.3
|
||||
2017-01-03 19:25:00,-2.2
|
||||
2017-01-03 19:30:00,-2.1
|
||||
2017-01-03 19:35:00,-2.3
|
||||
2017-01-03 19:40:00,-2.2
|
||||
2017-01-03 19:45:00,-2.0
|
||||
2017-01-03 19:50:00,-1.9
|
||||
2017-01-03 19:55:00,-1.8
|
||||
2017-01-03 20:00:00,-1.8
|
||||
2017-01-03 20:05:00,-1.9
|
||||
2017-01-03 20:10:00,-1.8
|
||||
2017-01-03 20:15:00,-1.6
|
||||
2017-01-03 20:20:00,-1.5
|
||||
2017-01-03 20:25:00,-1.1
|
||||
2017-01-03 20:30:00,-1.6
|
||||
2017-01-03 20:35:00,-2.2
|
||||
2017-01-03 20:40:00,-2.2
|
||||
2017-01-03 20:45:00,-2.3
|
||||
2017-01-03 20:50:00,-2.4
|
||||
2017-01-03 20:55:00,-2.4
|
||||
2017-01-03 21:00:00,-2.4
|
||||
2017-01-03 21:05:00,-2.3
|
||||
2017-01-03 21:10:00,-2.4
|
||||
2017-01-03 21:15:00,-2.5
|
||||
2017-01-03 21:20:00,-2.3
|
||||
2017-01-03 21:25:00,-2.1
|
||||
2017-01-03 21:30:00,-2.2
|
||||
2017-01-03 21:35:00,-2.2
|
||||
2017-01-03 21:40:00,-2.3
|
||||
2017-01-03 21:45:00,-2.3
|
||||
2017-01-03 21:50:00,-2.3
|
||||
2017-01-03 21:55:00,-2.3
|
||||
2017-01-03 22:00:00,-2.4
|
||||
2017-01-03 22:05:00,-2.3
|
||||
2017-01-03 22:10:00,-2.3
|
||||
2017-01-03 22:15:00,-2.4
|
||||
2017-01-03 22:20:00,-2.4
|
||||
2017-01-03 22:25:00,-2.5
|
||||
2017-01-03 22:30:00,-2.5
|
||||
2017-01-03 22:35:00,-2.7
|
||||
2017-01-03 22:40:00,-2.7
|
||||
2017-01-03 22:45:00,-2.8
|
||||
2017-01-03 22:50:00,-2.8
|
||||
2017-01-03 22:55:00,-2.8
|
||||
2017-01-03 23:00:00,-2.8
|
||||
2017-01-03 23:05:00,-2.8
|
||||
2017-01-03 23:10:00,-2.8
|
||||
2017-01-03 23:15:00,-2.7
|
||||
2017-01-03 23:20:00,-2.7
|
||||
2017-01-03 23:25:00,-2.6
|
||||
2017-01-03 23:30:00,-2.6
|
||||
2017-01-03 23:35:00,-2.5
|
||||
2017-01-03 23:40:00,-2.5
|
||||
2017-01-03 23:45:00,-2.4
|
||||
2017-01-03 23:50:00,-2.4
|
||||
2017-01-03 23:55:00,-2.4
|
||||
|
|
|
@ -2,11 +2,12 @@ library(prophet)
|
|||
context("Prophet tests")
|
||||
|
||||
DATA <- read.csv('data.csv')
|
||||
DATA$ds <- set_date(DATA$ds)
|
||||
N <- nrow(DATA)
|
||||
train <- DATA[1:floor(N / 2), ]
|
||||
future <- DATA[(ceiling(N/2) + 1):N, ]
|
||||
|
||||
DATA2 <- read.csv('data2.csv')
|
||||
|
||||
test_that("fit_predict", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
m <- prophet(train)
|
||||
|
|
@ -27,9 +28,10 @@ test_that("fit_predict_no_changepoints", {
|
|||
|
||||
test_that("fit_predict_changepoint_not_in_history", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
train_t <- dplyr::mutate(DATA, ds=set_date(ds))
|
||||
train_t <- dplyr::filter(train_t, (ds < set_date('2013-01-01')) |
|
||||
(ds > set_date('2014-01-01')))
|
||||
train_t <- dplyr::mutate(DATA, ds=prophet:::set_date(ds))
|
||||
train_t <- dplyr::filter(train_t,
|
||||
(ds < prophet:::set_date('2013-01-01')) |
|
||||
(ds > prophet:::set_date('2014-01-01')))
|
||||
future <- data.frame(ds=DATA$ds)
|
||||
m <- prophet(train_t, changepoints=c('2013-06-06'))
|
||||
expect_error(predict(m, future), NA)
|
||||
|
|
@ -101,15 +103,15 @@ test_that("get_zero_changepoints", {
|
|||
|
||||
test_that("fourier_series_weekly", {
|
||||
mat <- prophet:::fourier_series(DATA$ds, 7, 3)
|
||||
true.values <- c(0.7818315, 0.6234898, 0.9749279, -0.2225209, 0.4338837,
|
||||
-0.9009689)
|
||||
true.values <- c(0.9165623, 0.3998920, 0.7330519, -0.6801727, -0.3302791,
|
||||
-0.9438833)
|
||||
expect_equal(true.values, mat[1, ], tolerance = 1e-6)
|
||||
})
|
||||
|
||||
test_that("fourier_series_yearly", {
|
||||
mat <- prophet:::fourier_series(DATA$ds, 365.25, 3)
|
||||
true.values <- c(0.7006152, -0.7135393, -0.9998330, 0.01827656, 0.7262249,
|
||||
0.6874572)
|
||||
true.values <- c(0.69702635, -0.71704551, -0.99959923, 0.02830854,
|
||||
0.73648994, 0.67644849)
|
||||
expect_equal(true.values, mat[1, ], tolerance = 1e-6)
|
||||
})
|
||||
|
||||
|
|
@ -170,19 +172,20 @@ test_that("piecewise_logistic", {
|
|||
})
|
||||
|
||||
test_that("holidays", {
|
||||
holidays = data.frame(ds = set_date(c('2016-12-25')),
|
||||
holidays = data.frame(ds = c('2016-12-25'),
|
||||
holiday = c('xmas'),
|
||||
lower_window = c(-1),
|
||||
upper_window = c(0))
|
||||
df <- data.frame(
|
||||
ds = seq(set_date('2016-12-20'), set_date('2016-12-31'), by='d'))
|
||||
ds = seq(prophet:::set_date('2016-12-20'),
|
||||
prophet:::set_date('2016-12-31'), by='d'))
|
||||
m <- prophet(train, holidays = holidays, fit = FALSE)
|
||||
feats <- prophet:::make_holiday_features(m, df$ds)
|
||||
expect_equal(nrow(feats), nrow(df))
|
||||
expect_equal(ncol(feats), 2)
|
||||
expect_equal(sum(colSums(feats) - c(1, 1)), 0)
|
||||
|
||||
holidays = data.frame(ds = set_date(c('2016-12-25')),
|
||||
holidays = data.frame(ds = c('2016-12-25'),
|
||||
holiday = c('xmas'),
|
||||
lower_window = c(-1),
|
||||
upper_window = c(10))
|
||||
|
|
@ -194,7 +197,7 @@ test_that("holidays", {
|
|||
|
||||
test_that("fit_with_holidays", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
holidays <- data.frame(ds = set_date(c('2012-06-06', '2013-06-06')),
|
||||
holidays <- data.frame(ds = c('2012-06-06', '2013-06-06'),
|
||||
holiday = c('seans-bday', 'seans-bday'),
|
||||
lower_window = c(0, 0),
|
||||
upper_window = c(1, 1))
|
||||
|
|
@ -208,12 +211,12 @@ test_that("make_future_dataframe", {
|
|||
m <- prophet(train.t)
|
||||
future <- make_future_dataframe(m, periods = 3, freq = 'day',
|
||||
include_history = FALSE)
|
||||
correct <- set_date(c('2013-04-26', '2013-04-27', '2013-04-28'))
|
||||
correct <- prophet:::set_date(c('2013-04-26', '2013-04-27', '2013-04-28'))
|
||||
expect_equal(future$ds, correct)
|
||||
|
||||
future <- make_future_dataframe(m, periods = 3, freq = 'month',
|
||||
include_history = FALSE)
|
||||
correct <- set_date(c('2013-05-25', '2013-06-25', '2013-07-25'))
|
||||
correct <- prophet:::set_date(c('2013-05-25', '2013-06-25', '2013-07-25'))
|
||||
expect_equal(future$ds, correct)
|
||||
})
|
||||
|
||||
|
|
@ -261,9 +264,39 @@ test_that("auto_yearly_seasonality", {
|
|||
expect_equal(m$seasonalities[['yearly']], c(365.25, 7))
|
||||
})
|
||||
|
||||
test_that("auto_daily_seasonality", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
# Should be enabled
|
||||
m <- prophet(DATA2, fit = FALSE)
|
||||
expect_equal(m$daily.seasonality, 'auto')
|
||||
m <- prophet:::fit.prophet(m, DATA2)
|
||||
expect_true('daily' %in% names(m$seasonalities))
|
||||
expect_equal(m$seasonalities[['daily']], c(1, 4))
|
||||
# Should be disabled due to too short history
|
||||
N.d <- 430
|
||||
train.y <- DATA2[1:N.d, ]
|
||||
m <- prophet(train.y)
|
||||
expect_false('daily' %in% names(m$seasonalities))
|
||||
m <- prophet(train.y, daily.seasonality = TRUE)
|
||||
expect_true('daily' %in% names(m$seasonalities))
|
||||
m <- prophet(DATA2, daily.seasonality=7)
|
||||
expect_equal(m$seasonalities[['daily']], c(1, 7))
|
||||
m <- prophet(DATA)
|
||||
expect_false('daily' %in% names(m$seasonalities))
|
||||
})
|
||||
|
||||
test_that("test_subdaily_holidays", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
holidays <- data.frame(ds = c('2017-01-02'),
|
||||
holiday = c('special_day'))
|
||||
m <- prophet(DATA2, holidays=holidays)
|
||||
fcst <- predict(m)
|
||||
expect_equal(sum(fcst$special_day == 0), 575)
|
||||
})
|
||||
|
||||
test_that("custom_seasonality", {
|
||||
skip_if_not(Sys.getenv('R_ARCH') != '/i386')
|
||||
holidays <- data.frame(ds = set_date(c('2017-01-02')),
|
||||
holidays <- data.frame(ds = c('2017-01-02'),
|
||||
holiday = c('special_day'))
|
||||
m <- prophet(holidays=holidays)
|
||||
m <- add_seasonality(m, name='monthly', period=30, fourier.order=5)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -307,7 +307,7 @@ class TestProphet(TestCase):
|
|||
def test_auto_daily_seasonality(self):
|
||||
# Should be enabled
|
||||
m = Prophet()
|
||||
self.assertEqual(m.yearly_seasonality, 'auto')
|
||||
self.assertEqual(m.daily_seasonality, 'auto')
|
||||
m.fit(DATA2)
|
||||
self.assertIn('daily', m.seasonalities)
|
||||
self.assertEqual(m.seasonalities['daily'], (1, 4))
|
||||
|
|
|
|||
Loading…
Reference in a new issue