decision_tree_classify: Decision tree Prediction

View source: R/decision_tree_classify.R

decision_tree_classifyR Documentation

Decision tree Prediction

Description

Class predictions from train decision tree model.

Usage

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

Arguments

input_model

Pre-trained decision tree, to be used with test points (DecisionTreeModel).

test

Testing dataset (may contain categorical variables) (numeric matrix/data.frame with info).

test_labels

Test point 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).

Value

A list with several components defining the class attributes:

predictions

Class predictions for each test point (integer row).

Author(s)

mlpack developers

Examples

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

mlpack documentation built on July 23, 2026, 1:08 a.m.