
Parsnip model specs: symmetric epsilon-SVR with MAPE loss (Model 2)
psvr_mape_sym_specs.RdCreate parsnip model specifications for mape_sym_svr() with a fixed
kernel type. The symmetry type is exposed as the tunable sym_type
argument ("even" for a = 1, "odd" for a = -1); pass
sym_type = tune() to let CV select it automatically.
Usage
psvr_mape_sym_rbf(
mode = "regression",
engine = "psvr",
cost = NULL,
svm_margin = NULL,
rbf_sigma = NULL,
sym_type = NULL
)
psvr_mape_sym_poly(
mode = "regression",
engine = "psvr",
cost = NULL,
svm_margin = NULL,
degree = NULL,
scale_factor = NULL
)
psvr_mape_sym_linear(
mode = "regression",
engine = "psvr",
cost = NULL,
svm_margin = NULL
)Arguments
- mode
Only
"regression"is supported.- engine
Only
"psvr"is available.- cost
Regularization parameter
C > 0. Usehardhat::tune()to optimize. Mapped tocost_psvr()with range[-2, 10]on the log2 scale — wider thandials::cost()to cover the larger values needed by LS-SVR models.- svm_margin
Epsilon tube half-width
ε ≥ 0expressed as a percentage of each target value. Usehardhat::tune()to optimize. Mapped tomargin_percentage()with default range[1, 20](percentage units).- rbf_sigma
RBF bandwidth σ > 0. Use
hardhat::tune()to optimize. Mapped torbf_sigma_psvr(); the search range auto-finalizes using the median-distance heuristic when training data are available. (RBF specs only.)- sym_type
Symmetry type:
"even"(default, a = 1) or"odd"(a = -1). Usehardhat::tune()to optimise over both values during CV.- degree
Polynomial degree ≥ 1. Use
hardhat::tune()to optimize. (Polynomial specs only.)- scale_factor
Polynomial constant term (coef₀). Use
hardhat::tune()to optimize. (Polynomial specs only.)
Examples
if (FALSE) { # \dontrun{
library(parsnip)
spec <- psvr_mape_sym_rbf(cost = 10, svm_margin = 1, rbf_sigma = 1) |>
set_engine("psvr")
spec_poly <- psvr_mape_sym_poly(cost = 10, svm_margin = 1, degree = 2,
scale_factor = 1) |>
set_engine("psvr")
spec_lin <- psvr_mape_sym_linear(cost = 10, svm_margin = 1) |>
set_engine("psvr")
} # }