Random forest computes similarity between instances with classification of out-of-bag instances. If two out-of-bag cases are classified in the same tree leaf the proximity between them is incremented.
rfProximity(model, outProximity=TRUE)
Arguments
model: a CORElearn model of type random forest.
outProximity: if TRUE, function returns a proximity matrix, else it returns a distance matrix.
Details
A proximity is transformed into distance with expression distance=sqrt(1-proximity).
Returns
Function returns an M by M matrix where M is the number of training instances. Returned matrix is used as an input to other function (see rfOutliers