train_svr: Train Support Vector Regression (SVR) model

View source: R/train_MLmodels.R

train_svrR Documentation

Train Support Vector Regression (SVR) model

Description

Train Support

Usage

train_svr(data, formula)

Arguments

data

A data frame containing the training data.

formula

A formula specifying the model.

Details

Trains an SVR model using the radial kernel.

Value

A trained svm model object from the e1071 package.

Examples


# Load required package
library(e1071)

# Use built-in dataset
data(mtcars)

# Define regression formula
svr_formula <- mpg ~ cyl + disp + hp + wt

# Train SVR model
svr_model <- train_svr(data = mtcars, formula = svr_formula)

# Print model summary
print(svr_model)

# Predict on the same data (for illustration)
preds <- predict(svr_model, newdata = mtcars)
head(preds)


mlspatial documentation built on Aug. 27, 2025, 1:09 a.m.