Learn R Programming

hhcartr (version 1.0.0)

make_predictions: make_predictions Make predictions on the test dataset.

Description

This internal function is used to make predictions on the test dataset against all induced trees.

Usage

make_predictions(list_trees, test, useIdentity, classify, objectid)

Arguments

list_trees

List of all induced trees.

test

The test dataset.

useIdentity

Whether the training data has been transformed with the householder transform.

classify

Default is TRUE. Set TRUE for a classification problem and FALSE for a regression problem.

objectid

A list of node numbers that will be 'pruned' ie. when making predictions if the tree node matches a node in objectid the tree node will be used to make the prediction rather than traversing any underlying nodes.

Value

Accuracy, margin and predictions.