complementaryClusters {LearnClust} | R Documentation |
To check if two clusters include every element but without repeating anyone.
complementaryClusters(components, cluster1, cluster2)
components |
is an elements list. It contains every component that has to be in one cluster or in the other one. But each element can only be included in one cluster. |
cluster1 |
is a cluster (matrix). |
cluster2 |
is a cluster (matrix). |
This function checks if the cluster that will be divided contains the simple elements that they have to include. They have to contain every element, but anyone should be duplicated.
The function will return a boolean value.
Boolean value.
Roberto Alcántara roberto.alcantara@edu.uah.es
Juan José Cuadrado jjcg@uah.es
Universidad de Alcalá de Henares
data <- c(1,2,1,3,1,4,1,5)
components <- toListDivisive(data)
cluster1 <- matrix(c(1,2,1,3),ncol=2)
cluster2 <- matrix(c(1,4,1,5),ncol=2)
cluster3 <- matrix(c(1,6,1,7),ncol=2)
complementaryClusters(components,cluster1,cluster2) #TRUE
complementaryClusters(components,cluster3,cluster2) #FALSE