-
Notifications
You must be signed in to change notification settings - Fork 27
/
param_bart.R
48 lines (46 loc) · 1.18 KB
/
param_bart.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
#' Parameters for BART models
#
#' These parameters are used for constructing Bayesian adaptive regression tree
#' (BART) models.
#'
#' @inheritParams Laplace
#'
#' @details
#' These parameters are often used with Bayesian adaptive regression trees (BART)
#' via `parsnip::bart()`.
#' @name bart-param
#' @export
prior_terminal_node_coef <- function(range = c(0, 1), trans = NULL) {
new_quant_param(
type = "double",
range = range,
inclusive = c(FALSE, TRUE),
trans = trans,
label = c(prior_terminal_node_coef = "Terminal Node Prior Coefficient"),
finalize = NULL
)
}
#' @rdname bart-param
#' @export
prior_terminal_node_expo <- function(range = c(1, 3), trans = NULL) {
new_quant_param(
type = "double",
range = range,
inclusive = c(FALSE, TRUE),
trans = trans,
label = c(prior_terminal_node_expo = "Terminal Node Prior Exponent"),
finalize = NULL
)
}
#' @rdname bart-param
#' @export
prior_outcome_range <- function(range = c(0, 5), trans = NULL) {
new_quant_param(
type = "double",
range = range,
inclusive = c(FALSE, TRUE),
trans = trans,
label = c(prior_outcome_range = "Prior for Outcome Range"),
finalize = NULL
)
}