Learn R Programming

CaseBasedReasoning (version 0.4.1)

weightedDistance: Weighted Distance calculation

Description

Weighted Distance calculation

Usage

weightedDistance(x, y = NULL, weights = NULL)

weighted_distance(x, y = NULL, weights = NULL)

Value

a dist or matrix object

Arguments

x

a new dataset

y

a second new dataset

weights

a vector of weights

Examples

Run this code
# \donttest{
library(ranger)
rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
terminal_nodes(iris[, -5], rf)
# }

Run the code above in your browser using DataLab