Learn R Programming

mlpack (version 4.8.0)

random_forest_classify: Random Forests Prediction

Description

Class predictions from random forest model.

Usage

random_forest_classify(
  input_model,
  test,
  test_labels = NA,
  verbose = getOption("mlpack.verbose", FALSE)
)

Value

A list with several components defining the class attributes:

predictions

Predicted classes for each point in the test set (integer row).

Arguments

input_model

Pre-trained random forest to use for classification (RandomForestModel).

test

Test dataset to produce predictions for (numeric matrix).

test_labels

Test dataset labels, if accuracy calculation is desired (integer row).

verbose

Display informational messages and the full list of parameters and timers at the end of execution. Default value "getOption("mlpack.verbose", FALSE)" (logical).

Author

mlpack developers

Examples

Run this code
# \dontrun{ pred <- predict(model, newdata=X_test) }

Run the code above in your browser using DataLab