Learn R Programming

CaseBasedReasoning (version 0.3)

weightedDistance: Weighted Distance calculation

Description

Weighted Distance calculation

Usage

weightedDistance(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{
require(ranger)
rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
terminalNodes(iris[, -5], rf)
# }

Run the code above in your browser using DataLab