mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-09-15 22:10:22 +00:00
Warning messages for seasonality
This commit is contained in:
parent
b98ec17668
commit
c2b9f6229f
1 changed files with 4 additions and 0 deletions
|
|
@ -416,6 +416,8 @@ set_auto_seasonalities <- function(m) {
|
||||||
last <- max(m$history$ds)
|
last <- max(m$history$ds)
|
||||||
if (m$yearly.seasonality == 'auto') {
|
if (m$yearly.seasonality == 'auto') {
|
||||||
if (last - first < 730) {
|
if (last - first < 730) {
|
||||||
|
warn('Disabling yearly seasonality. ',
|
||||||
|
'Run prophet with `yearly.seasonality=TRUE` to override this.')
|
||||||
m$yearly.seasonality <- FALSE
|
m$yearly.seasonality <- FALSE
|
||||||
} else {
|
} else {
|
||||||
m$yearly.seasonality <- TRUE
|
m$yearly.seasonality <- TRUE
|
||||||
|
|
@ -425,6 +427,8 @@ set_auto_seasonalities <- function(m) {
|
||||||
dt <- diff(m$history$ds)
|
dt <- diff(m$history$ds)
|
||||||
min.dt <- min(dt[dt > 0])
|
min.dt <- min(dt[dt > 0])
|
||||||
if ((last - first < 14) || (min.dt >= 7)) {
|
if ((last - first < 14) || (min.dt >= 7)) {
|
||||||
|
warning('Disabling weekly seasonality. ',
|
||||||
|
'Run prophet with `weekly.seasonality=TRUE` to override this.')
|
||||||
m$weekly.seasonality <- FALSE
|
m$weekly.seasonality <- FALSE
|
||||||
} else {
|
} else {
|
||||||
m$weekly.seasonality <- TRUE
|
m$weekly.seasonality <- TRUE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue