Learn R Programming

daltoolbox (version 1.3.717)

cla_xgboost: XGBoost

Description

Gradient boosting classifier using xgboost.

Usage

cla_xgboost(attribute, params = list(), nrounds = 20)

Value

returns a cla_xgboost object

Arguments

attribute

target attribute name

params

list of xgboost parameters

nrounds

number of boosting rounds

Examples

Run this code
if (requireNamespace("xgboost", quietly = TRUE)) {
 data(iris)
 model <- cla_xgboost("Species", nrounds = 20)
 model <- fit(model, iris)
 pred <- predict(model, iris)
 table(pred, iris$Species)
}

Run the code above in your browser using DataLab