mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-30 20:18:11 +00:00
Fix duplicated function from merge
This commit is contained in:
parent
439efb7209
commit
4b185bf001
1 changed files with 0 additions and 34 deletions
|
|
@ -752,40 +752,6 @@ parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) {
|
|||
return(fourier.order)
|
||||
}
|
||||
|
||||
#' Get number of Fourier components for built-in seasonalities.
|
||||
#'
|
||||
#' @param m Prophet object.
|
||||
#' @param name String name of the seasonality component.
|
||||
#' @param arg 'auto', TRUE, FALSE, or number of Fourier components as
|
||||
#' provided.
|
||||
#' @param auto.disable Bool if seasonality should be disabled when 'auto'.
|
||||
#' @param default.order Int default Fourier order.
|
||||
#'
|
||||
#' @return Number of Fourier components, or 0 for disabled.
|
||||
#'
|
||||
#' @keywords internal
|
||||
parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) {
|
||||
if (arg == 'auto') {
|
||||
fourier.order <- 0
|
||||
if (name %in% names(m$seasonalities)) {
|
||||
warning('Found custom seasonality named "', name,
|
||||
'", disabling built-in ', name, ' seasonality.')
|
||||
} else if (auto.disable) {
|
||||
warning('Disabling ', name, ' seasonality. Run prophet with ', name,
|
||||
'.seasonality=TRUE to override this.')
|
||||
} else {
|
||||
fourier.order <- default.order
|
||||
}
|
||||
} else if (arg == TRUE) {
|
||||
fourier.order <- default.order
|
||||
} else if (arg == FALSE) {
|
||||
fourier.order <- 0
|
||||
} else {
|
||||
fourier.order <- arg
|
||||
}
|
||||
return(fourier.order)
|
||||
}
|
||||
|
||||
#' Set seasonalities that were left on auto.
|
||||
#'
|
||||
#' Turns on yearly seasonality if there is >=2 years of history.
|
||||
|
|
|
|||
Loading…
Reference in a new issue