
Parsnip model specs: symmetric LS-SVR with RMSPE loss (Model 4)
psvr_rmspe_sym_specs.RdCreate parsnip model specifications for rmspe_sym_lssvr() 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_rmspe_sym_rbf(
mode = "regression",
engine = "psvr",
cost = NULL,
rbf_sigma = NULL,
sym_type = NULL
)
psvr_rmspe_sym_poly(
mode = "regression",
engine = "psvr",
cost = NULL,
degree = NULL,
scale_factor = NULL
)
psvr_rmspe_sym_linear(mode = "regression", engine = "psvr", cost = NULL)Arguments
- mode
Only
"regression"is supported.- engine
Only
"psvr"is available.- cost
Regularization parameter
Γ > 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.- 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.)
Engine arguments
The precondition argument of rmspe_sym_lssvr() is exposed as a
non-tunable engine argument. Pass it via parsnip::set_engine(), e.g.
set_engine("psvr", precondition = "always"). Default is "auto". See
rmspe_sym_lssvr() for accepted values and semantics.
Examples
if (FALSE) { # \dontrun{
library(parsnip)
spec <- psvr_rmspe_sym_rbf(cost = 1000, rbf_sigma = 1) |>
set_engine("psvr")
spec_poly <- psvr_rmspe_sym_poly(cost = 1000, degree = 2,
scale_factor = 1) |>
set_engine("psvr")
spec_lin <- psvr_rmspe_sym_linear(cost = 1000) |>
set_engine("psvr")
} # }