# For example, to run AdaBoost on an input dataset "data" with labels
# "labels"and perceptrons as the weak learner type, storing the trained model
# in "model", one could use the following command:
if (FALSE) {
output <- adaboost(training=data, labels=labels, weak_learner="perceptron")
model <- output$output_model
}
# Similarly, an already-trained model in "model" can be used to provide class
# predictions from test data "test_data" and store the output in
# "predictions" with the following command:
if (FALSE) {
output <- adaboost(input_model=model, test=test_data)
predictions <- output$predictions
}
Run the code above in your browser using DataLab