Learn R Programming

PatientLevelPrediction (version 6.4.1)

setAdaBoost: Create setting for AdaBoost with python DecisionTreeClassifier base estimator

Description

Create setting for AdaBoost with python DecisionTreeClassifier base estimator

Usage

setAdaBoost(
  nEstimators = list(10, 50, 200),
  learningRate = list(1, 0.5, 0.1),
  algorithm = list("SAMME"),
  seed = sample(1e+06, 1)
)

Value

a modelSettings object

Arguments

nEstimators

(list) The maximum number of estimators at which boosting is terminated. In case of perfect fit, the learning procedure is stopped early.

learningRate

(list) Weight applied to each classifier at each boosting iteration. A higher learning rate increases the contribution of each classifier. There is a trade-off between the learningRate and nEstimators parameters There is a trade-off between learningRate and nEstimators.

algorithm

Only ‘SAMME’ can be provided. The 'algorithm' argument will be deprecated in scikit-learn 1.8.

seed

A seed for the model

Examples

Run this code
 # dontrun reason: requires python's scikit-learn, checkSklearn() will error without it 
if (FALSE) { 
model <- setAdaBoost(nEstimators = list(10),
                     learningRate = list(0.1),
                     seed = 42)
}

Run the code above in your browser using DataLab