Description Usage Arguments Details Value Author(s) See Also

View source: R/predict.nodeHarvest.R

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

1 2 3 4 |

`object` |
An object of class |

`newdata` |
A data matrix with predictor variables. If missing, the predictions on the training data are returned. |

`explain` |
Row numbers for |

`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 |

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`

.

A numeric vector with the predicted response.

Nicolai Meinshausen meinshausen@stats.ox.ac.uk

http://www.stats.ox.ac.uk/~meinshau

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.