Skip to contents

Model fitting

One fitter per model family. psvr_mape() covers the epsilon-SVR models (1 and 2), psvr_rmspe() the LS-SVR models (3 and 4); within each, sym_type = "none" | "even" | "odd" selects the symmetric variant. They are separate functions because the two families share no solver, no dual structure and no hyperparameter search space.

psvr_mape()
Fit an epsilon-SVR with MAPE loss
psvr_rmspe()
Fit a least-squares SVR with RMSPE loss

Kernel factory

Shared kernel interface used by all four models.

make_kernel()
Create a kernel function

Cross-validation

Fold-wise fitting for loss = "mape", carrying the converged SMO dual variables from one fold into the next as a warm start.

psvr_cv()
Cross-validate psvr_mape() with automatic warm-start across folds

tidymodels / parsnip interface — ε-SVR with MAPE (Models 1 & 2)

Parsnip model specifications for the ε-SVR family (one per kernel type). sym_type = "none" fits Model 1; "even" / "odd" fit Model 2.

psvr_mape_rbf() psvr_mape_poly() psvr_mape_linear()
Parsnip model specs: epsilon-SVR with MAPE loss (Model 1)

tidymodels / parsnip interface — LS-SVR with RMSPE (Models 3 & 4)

Parsnip model specifications for the LS-SVR family (one per kernel type). sym_type = "none" fits Model 3; "even" / "odd" fit Model 4.

psvr_rmspe_rbf() psvr_rmspe_poly() psvr_rmspe_linear()
Parsnip model specs: LS-SVR with RMSPE loss (Model 3)

Hyperparameter utilities

Custom dials parameters and tuning helpers for psvr models.

margin_percentage()
Insensitivity margin in percentage units
sigma_heuristic()
Median-distance heuristic for RBF kernel bandwidth
rbf_sigma_psvr()
RBF sigma parameter for psvr models
rbf_sigma_psvr_data()
RBF sigma parameter with data-driven range for psvr models
psvr_option_add()
Apply data-driven rbf_sigma to all psvr workflows in a workflow set
psvr_option_add_cost_ls()
Apply data-driven LS-SVR cost range to all m3/m4 workflows in a workflow set
cost_psvr()
Cost parameter with extended range for psvr models
cost_psvr_ls_data()
Data-driven cost range for LS-SVR psvr models
sym_type_param()
Dials parameter for symmetry type

Fit-object methods

Methods for the four fit classes — psvr_mape, psvr_mape_sym, psvr_rmspe, psvr_rmspe_sym. These are what psvr_mape() and psvr_rmspe() return and what the parsnip engine fit wrappers return, so a direct fit and a parsnip fit unwrapped with parsnip::extract_fit_engine() are the same object.

predict(<psvr_mape>)
Predict from a fitted epsilon-SVR with MAPE model
predict(<psvr_mape_sym>)
Predict from a fitted symmetric epsilon-SVR with MAPE model
predict(<psvr_rmspe>)
Predict from a fitted LS-SVR with RMSPE model
predict(<psvr_rmspe_sym>)
Predict from a fitted symmetric LS-SVR with RMSPE model
print(<psvr_mape>)
Print method for psvr_mape objects
print(<psvr_mape_sym>)
Print method for psvr_mape_sym objects
print(<psvr_rmspe>)
Print method for psvr_rmspe objects
print(<psvr_rmspe_sym>)
Print method for psvr_rmspe_sym objects
coef(<psvr_mape>)
Extract coefficients from a psvr_mape model
coef(<psvr_mape_sym>)
Extract coefficients from a psvr_mape_sym model
coef(<psvr_rmspe>)
Extract coefficients from a psvr_rmspe model
coef(<psvr_rmspe_sym>)
Extract coefficients from a psvr_rmspe_sym model
summary(<psvr_mape>)
Summarize a fitted epsilon-SVR with MAPE loss
summary(<psvr_mape_sym>)
Summarize a fitted symmetric epsilon-SVR with MAPE loss
summary(<psvr_rmspe>)
Summarize a fitted LS-SVR with RMSPE loss
summary(<psvr_rmspe_sym>)
Summarize a fitted symmetric LS-SVR with RMSPE loss
fitted(<psvr_mape>) fitted(<psvr_mape_sym>) fitted(<psvr_rmspe>) fitted(<psvr_rmspe_sym>)
Extract training fitted values from a psvr model
residuals(<psvr_mape>) residuals(<psvr_mape_sym>) residuals(<psvr_rmspe>) residuals(<psvr_rmspe_sym>)
Extract training residuals from a psvr model