Skip to contents

Predict with a regression tree

Usage

morie_esl_tree_predict(tree, X)

Arguments

tree

A tree node list, or the result of morie_esl_decision_tree.

X

Rows to predict.

Value

Numeric predictions.

Examples

t <- morie_esl_decision_tree(cbind(c(0, 1, 9)), c(0, 0, 4), max_depth = 1)
morie_esl_tree_predict(t, cbind(c(0, 100)))
#> [1] 0 4