# predict.nodeHarvest

0th

Percentile

##### predict method for Node Harvest objects

Given new observations, compute the prediction of a node harvest estimator.

##### Usage
"predict"(object, newdata = NULL, explain = NULL,  maxshow = 5,  weight = sapply(object[["nodes"]], attr, "weight"), ...)
##### Arguments
object
An object of class nodeHarvest.
newdata
A data matrix with predictor variables. If missing, the predictions on the training data are returned.
explain
Row numbers for newdata for which the predictions should be explained'. If NULL, no explanation is given.
maxshow
When explaining a prediction, show at most this many nodes (the most important ones).
weight
Optional changed weight vector for the nodes.
...
Additional arguments passed to predict
##### Details

If explains is equal to NULL, no output is printed. If explain is a numeric vector (with values in 1 to the number of samples in newdata), for each observation in newdata with a sample number in vector explain, the following is done: all nodes that the observation belongs to are printed on screen, along with their node mean (the mean of all training observations who fell into this node) and weight. The prediction for this new observation is the weighted average across these node means. The number of nodes show is given in descending order of their importance (weight) and the number of nodes shown is limited to maxshow.

##### Value

A numeric vector with the predicted response.

nodeHarvest, plot.nodeHarvest`