Prediction of test data from a fitted modified CARTGV tree.

predict_cartgv.rf(new, tree, tree_split)

Arguments

new

a new data frame containing the same variables that "data".

tree

the data frame "tree" returned by the function "cartgv.rf".

tree_split

the object "tree_split" returned by the function "cartgv.rf".

Value

a matrix with "nrows(new)" rows (the i-th row is provided prediction information about the -ith observation in "new") and the 4 followingcolumns, - Y: the true label ("0" or "1"), - hat.Y: the predicted label ("0" or "1"), - noeuds: name of the node in the modified CARTGV tree, - score: conditionnal probability that the observation has "Y=1", - i_noeuds: name of the node in the splitting tree.

Details

The function called the function "predict_cartgv".