predictInfo {Rforestry}R Documentation

predictInfo-forestry

Description

Get the observations which are used to predict for a set of new observations using either all trees (for out of sample observations), or tree for which the observation is out of averaging set or out of sample entirely.

Usage

predictInfo(object, newdata, aggregation = "average")

Arguments

object

A 'forestry' object.

newdata

Data on which we want to do predictions. Must be the same length as the training set if we are doing 'oob' or 'doubleOOB' aggregation.

aggregation

Specifies which aggregation version is used to predict for the observation, must be one of 'average','oob', and 'doubleOOB'.

Value

A list with four entries. 'weightMatrix' is a matrix specifying the weight given to training observatio i when prediction on observation j. 'avgIndices' gives the indices which are in the averaging set for each new observation. 'avgWeights' gives the weights corresponding to each averaging observation returned in 'avgIndices'. 'obsInfo' gives the full observation vectors which were used to predict for an observation, as well as the weight given each observation.


[Package Rforestry version 0.10.0 Index]