View source: R/train_MLmodels.R
train_svr | R Documentation |
Train Support
train_svr(data, formula)
data |
A data frame containing the training data. |
formula |
A formula specifying the model. |
Trains an SVR model using the radial kernel.
A trained svm
model object from the e1071 package.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.