
Parsnip model specs: LS-SVR with RMSPE loss (Model 3)
psvr_rmspe_specs.RdCreate parsnip model specifications for rmspe_lssvr() with a fixed kernel
type. cost maps to the regularization parameter Γ.
Usage
psvr_rmspe_rbf(
mode = "regression",
engine = "psvr",
cost = NULL,
rbf_sigma = NULL
)
psvr_rmspe_poly(
mode = "regression",
engine = "psvr",
cost = NULL,
degree = NULL,
scale_factor = NULL
)
psvr_rmspe_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.)- 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_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_lssvr() for accepted values and semantics.
Examples
if (FALSE) { # \dontrun{
library(parsnip)
spec <- psvr_rmspe_rbf(cost = 1000, rbf_sigma = 1) |>
set_engine("psvr")
spec_poly <- psvr_rmspe_poly(cost = 1000, degree = 2, scale_factor = 1) |>
set_engine("psvr")
spec_lin <- psvr_rmspe_linear(cost = 1000) |>
set_engine("psvr")
} # }