Learn R Programming

butcher (version 0.3.5)

axe-ksvm: Axing a ksvm object.

Description

ksvm objects are created from kernlab package, which provides a means to do classification, regression, clustering, novelty detection, quantile regression and dimensionality reduction. Since fitted model objects from kernlab are S4, the butcher_ksvm class is not appended.

Usage

# S3 method for ksvm
axe_call(x, verbose = FALSE, ...)

# S3 method for ksvm axe_data(x, verbose = FALSE, ...)

# S3 method for ksvm axe_fitted(x, verbose = FALSE, ...)

Value

Axed ksvm object.

Arguments

x

A model object.

verbose

Print information each time an axe method is executed. Notes how much memory is released and what functions are disabled. Default is FALSE.

...

Any additional arguments related to axing.

Examples

Run this code
if (FALSE) { # rlang::is_installed(c("parsnip", "kernlab"))
# Load libraries
library(parsnip)
library(kernlab)

# Load data
data(spam)

# Create model and fit
ksvm_class <- svm_poly(mode = "classification") %>%
  set_engine("kernlab") %>%
  fit(type ~ ., data = spam)

out <- butcher(ksvm_class, verbose = TRUE)
}

Run the code above in your browser using DataLab