Skip to contents

Get random forest induced kernel weight matrix of testing samples
             or between any two sets of data. This is an experimental feature.
             Use at your own risk.

Usage

forest.kernel(
  object,
  X1 = NULL,
  X2 = NULL,
  vs.train = FALSE,
  verbose = FALSE,
  ...
)

Arguments

object

A fitted RLT object.

X1

The dataset for prediction. This calculates an \(n_1 \times n_1\) kernel matrix of X1.

X2

The dataset for reference/training. If X2 is supplied, then calculate an \(n_1 \times n_2\) kernel matrix. If vs.train is used, then this must be the original training data.

vs.train

To calculate the kernel weights with respect to the training data. This is slightly different than supplying the training data to X2 due to re-samplings of the training process. To use this feature, you must specify resample.track = TRUE in param.control when fitting the forest

verbose

Whether fitting should be printed.

...

... Additional arguments.

Value

A kernel matrix that contains kernel weights for each observation in X1 with respect to X1