forked from business-science/modeltime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdials-ets_params.R
73 lines (67 loc) · 1.83 KB
/
dials-ets_params.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#' Tuning Parameters for Exponential Smoothing Models
#'
#' @param values A character string of possible values.
#'
#' @details
#' The main parameters for Exponential Smoothing models are:
#'
#' - `error`: The form of the error term: additive", or "multiplicative".
#' If the error is multiplicative, the data must be non-negative.
#' - `trend`: The form of the trend term: "additive", "multiplicative" or "none".
#' - `season`: The form of the seasonal term: "additive", "multiplicative" or "none"..
#' - `damping`: Apply damping to a trend: "damped", or "none".
#'
#'
#' @examples
#'
#' error()
#'
#' trend()
#'
#' season()
#'
#' @name exp_smoothing_params
#' @export
#' @rdname exp_smoothing_params
error <- function(values = c("additive", "multiplicative")) {
dials::new_qual_param(
type = c("character"),
values = values,
default = "additive",
label = c(error = "Error Term"),
finalize = NULL
)
}
#' @export
#' @rdname exp_smoothing_params
trend <- function(values = c("additive", "multiplicative", "none")) {
dials::new_qual_param(
type = c("character"),
values = values,
default = "additive",
label = c(trend = "Trend Term"),
finalize = NULL
)
}
#' @export
#' @rdname exp_smoothing_params
season <- function(values = c("additive", "multiplicative", "none")) {
dials::new_qual_param(
type = c("character"),
values = values,
default = "additive",
label = c(season = "Season Term"),
finalize = NULL
)
}
#' @export
#' @rdname exp_smoothing_params
damping <- function(values = c("damped", "none")) {
dials::new_qual_param(
type = c("character"),
values = values,
default = "none",
label = c(damping = "Damping Term"),
finalize = NULL
)
}