Skip to content

randomForest: proximity for new objects using an existing rf

2 messages · Kilian, Liaw, Andy

#
There's an alternative, but it may not be any more efficient in time or memory...

You can run predict() on the training set once, setting nodes=TRUE.  That will give you a n by ntree matrix of which node of which tree the data point falls in.  For any new data, you would run predict() with nodes=TRUE, then compute the proximity "by hand" by counting how often any given pair landed in the same terminal node of each tree.

Andy
Notice:  This e-mail message, together with any attachme...{{dropped:11}}