Prediction of test data from a fitted modified CARTGV tree.
predict_cartgv.rf(new, tree, tree_split)
| new | a new data frame containing the same variables that " |
|---|---|
| tree | the data frame " |
| tree_split | the object " |
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.
The function called the function "predict_cartgv".