get_distance_values: 'get_distance_values' calculated tree based distance values...

View source: R/get_distance_values.R

get_distance_valuesR Documentation

get_distance_values calculated tree based distance values for a single tree or random forest built with ranger. Returned distance values still need to be aggregated, e.g. with get_distance_score.R. function to get distance values that returns matrix with distance values

Description

get_distance_values calculated tree based distance values for a single tree or random forest built with ranger. Returned distance values still need to be aggregated, e.g. with get_distance_score.R. function to get distance values that returns matrix with distance values

Usage

get_distance_values(rf, metric = metric, test_data = NULL)

Arguments

rf

Object of class ranger used with write.forest = TRUE.

metric

Specification of distance (dissimilarity) metric. Available are "splitting variables", "weighted splitting variables", and "prediction".

test_data

Additional data set comparable to the data set rf was build on. Only needed for metric "prediction".

Value

matrix of values for distance calculation (cols = trees)

Author(s)

Lea Louisa Kronziel, M.sc.


imbs-hl/timbR documentation built on April 17, 2025, 2:08 p.m.