Skip to contents

Fit a linear model on the provided data.

Usage

# S3 method for InducerXGBoost
fit(
  .inducer,
  .data = NULL,
  nrounds = 1,
  eta = 0.3,
  gamma = 0,
  max_depth = 6,
  min_child_weight = 1,
  subsample = 1,
  colsample_bytree = 1,
  lambda = 1,
  alpha = 0,
  num_parallel_tree = 1,
  ...
)

Arguments

.inducer

A InducerXGBoost object

.data

The data to which the model should be fitted, provided as a Dataset object.

nrounds

number of rounds

eta

eta value

gamma

gamma

max_depth

max depth paramater

min_child_weight

min child weight paramater

subsample

subsample paramater

colsample_bytree

colsample paramater

lambda

lambda paramater

alpha

alpha paramater

num_parallel_tree

number of parallel tree paramater

...

further args

Value

An object of class InducerXGBoost.

Examples

inducer <- InducerXGBoost()
inducer
#> Inducer: XGBoost
#> Configuration:  nrounds = 1, eta = 0.3, gamma = 0, max_depth = 6, min_child_weight = 1, subsample = 1, colsample_bytree = 1, lambda = 1, alpha = 0, num_parallel_tree = 1
cars.data <- Dataset(data = cars, target = "dist")
fittedmod <- fit.InducerXGBoost(.inducer = inducer, .data = cars.data)
#> Error in fit.InducerXGBoost(.inducer = inducer, .data = cars.data): could not find function "fit.InducerXGBoost"
fittedmod
#> Error in eval(expr, envir, enclos): object 'fittedmod' not found