mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-30 20:18:11 +00:00
Convert manual changepoints to POSIXct before validation
This commit is contained in:
parent
093b4b7eec
commit
85220328bb
1 changed files with 1 additions and 1 deletions
|
|
@ -313,6 +313,7 @@ setup_dataframe <- function(m, df, initialize_scales = FALSE) {
|
|||
set_changepoints <- function(m) {
|
||||
if (!is.null(m$changepoints)) {
|
||||
if (length(m$changepoints) > 0) {
|
||||
m$changepoints <- set_date(m$changepoints)
|
||||
if (min(m$changepoints) < min(m$history$ds)
|
||||
|| max(m$changepoints) > max(m$history$ds)) {
|
||||
stop('Changepoints must fall within training data.')
|
||||
|
|
@ -331,7 +332,6 @@ set_changepoints <- function(m) {
|
|||
}
|
||||
}
|
||||
if (length(m$changepoints) > 0) {
|
||||
m$changepoints <- set_date(m$changepoints)
|
||||
m$changepoints.t <- sort(
|
||||
time_diff(m$changepoints, m$start, "secs")) / m$t.scale
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue