Learn R Programming

LearnClust (version 1.1)

mdDivisive: Matrix distance by distance and approach type.

Description

To calculate the matrix distance by using distance and approach types.

Usage

mdDivisive(list, distance, approach, components)

Arguments

list

is a clusters list.

distance

is a string. The distance type to be used.

approach

is a string. The approach type to be used.

components

is a clusters list. It contains every clusters with only one element. It is used to check if complementary condition is 'TRUE'.

Value

Matrix distance.

Details

This function is part of the divisive hierarchical clusterization method. The function calculates the matrix distance by using the distance and approach types given.

The list parameter will be a list with the clusters as rows and columns.

The function avoids distances equal 0 and undefined clusters.

It also avoids distances between clusters that are not complementary because they can't be chosen to divide all the clusters.

Examples

Run this code
# NOT RUN {
data <- c(1,2,1,3,1,4,1,5,1,6)

clusters <- toList(data)

components <- toList(data)

mdDivisive(clusters, 'EUC', 'MAX', components)

mdDivisive(clusters, 'MAN', 'MIN', components)

# }

Run the code above in your browser using DataLab