Creates a matrix of proximity values.

proximityMatrix(trees, nRows, normalize = TRUE, reorder = TRUE, iter = NULL)

Arguments

trees

A list of tree attributes created by `extractTreeData` function.

nRows

Number of rows to consider.

normalize

Default is TRUE. Divide the total number of pairs of observations by the number of trees.

reorder

Default is TRUE. Whether to sort the matrix so high values are pushed to top left.

iter

Which iteration to use, if NULL the proximity matrix is calculated over all iterations.

Value

A matrix containing proximity values.

Examples

if (FALSE) {
df_trees <- extractTreeData(model = my_model, data = my_data)
bmProx <- proximityMatrix(trees = df_trees, reorder = TRUE, normalize = TRUE, iter = 1)
}