Learn R Programming

LearnClust (version 1.1)

canberradistanceW.details: To calculate the Canberra distance applying weights .

Description

To explain how to calculate the Canberra distance between clusters applying weights given.

Usage

canberradistanceW.details(cluster1, cluster2, weight)

Arguments

cluster1

is a cluster.

cluster2

is a cluster.

weight

is a numeric vector.

Value

canberra distance applying weights value. Explanation.

Details

The function calculates the Canberra distance value from cluster1 and cluster2, applying weights to the cluster's components.

Examples

Run this code
# NOT RUN {
cluster1 <- matrix(c(1,2),ncol=2)
cluster2 <- matrix(c(1,3),ncol=2)

weight1 <- c(0.4,0.6)
weight2 <- c(2,12)

canberradistanceW.details(cluster1,cluster2,weight1)

canberradistanceW.details(cluster1,cluster2,weight2)

# }

Run the code above in your browser using DataLab