axe-earth: Axing an earth object.

Description Usage Arguments Value Examples

Description

earth objects are created from the earth package, which is leveraged to do multivariate adaptive regression splines.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'earth'
axe_call(x, verbose = FALSE, ...)

## S3 method for class 'earth'
axe_data(x, verbose = FALSE, ...)

## S3 method for class 'earth'
axe_fitted(x, verbose = FALSE, ...)

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.

Value

Axed earth object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Load libraries
suppressWarnings(suppressMessages(library(parsnip)))

# Create model and fit
earth_fit <- mars(mode = "regression") %>%
  set_engine("earth") %>%
  fit(Volume ~ ., data = trees)

out <- butcher(earth_fit, verbose = TRUE)

# Another earth model object
suppressWarnings(suppressMessages(library(earth)))
earth_mod <- earth(Volume ~ ., data = trees)
out <- butcher(earth_mod, verbose = TRUE)

butcher documentation built on June 28, 2021, 9:08 a.m.