Skip to contents

Classification using ada. Calls ada::ada() from ada.

Initial parameter values

  • xval is set to 0 by default for speed.

Dictionary

This Learner can be instantiated via lrn():

lrn("classif.ada")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, mlr3extralearners, ada, rpart

Parameters

IdTypeDefaultLevelsRange
bag.fracnumeric0.5\([0, 1]\)
bag.shiftlogicalFALSETRUE, FALSE-
cpnumeric0.01\([0, 1]\)
deltanumeric1e-10\([0, \infty)\)
iterinteger50\([1, \infty)\)
losscharacterexponentialexponential, logistic-
max.iterinteger20\([1, \infty)\)
maxcompeteinteger4\([0, \infty)\)
maxdepthinteger30\([1, 30]\)
maxsurrogateinteger5\([0, \infty)\)
minbucketinteger-\([1, \infty)\)
minsplitinteger20\([1, \infty)\)
model.coeflogicalTRUETRUE, FALSE-
n.iterinteger50\([1, \infty)\)
nunumeric0.1\([0, \infty)\)
surrogatestyleinteger0\([0, 1]\)
typecharacterdiscretediscrete, real, gentle-
usesurrogateinteger2\([0, 2]\)
verboselogicalFALSETRUE, FALSE-
xvalinteger0\([0, \infty)\)

See also

Author

annanzrv

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifAdaBoosting

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method oob_error()

The oob error is extracted extracted from the model slot $model$errs.

Usage

LearnerClassifAdaBoosting$oob_error()

Returns

Named numeric().


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifAdaBoosting$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = lrn("classif.ada")
print(learner)
#> 
#> ── <LearnerClassifAdaBoosting> (classif.ada): ada Boosting ─────────────────────
#> • Model: -
#> • Parameters: xval=0
#> • Packages: mlr3, mlr3extralearners, ada, and rpart
#> • Predict Types: [response] and prob
#> • Feature Types: logical, integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: missings, oob_error, and twoclass
#> • Other settings: use_weights = 'error'

# Define a Task
task = tsk("sonar")

# Create train and test set
ids = partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> Call:
#> ada(task$formula(), data = task$data(), control = list(xval = 0L))
#> 
#> Loss: exponential Method: discrete   Iteration: 50 
#> 
#> Final Confusion Matrix for Data:
#>           Final Prediction
#> True value  M  R
#>          M 77  1
#>          R  0 61
#> 
#> Train Error: 0.007 
#> 
#> Out-Of-Bag Error:  0.014  iteration= 47 
#> 
#> Additional Estimates of number of iterations:
#> 
#> train.err1 train.kap1 
#>         33         33 
#> 


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> classif.ce 
#>  0.2028986