measureConstraintsOk | R Documentation |
Calculate the rates of ML and CNL constraints satisfaction in a clustering result.
measureConstraintsOk(label, list.ML = list(), list.CNL = list())
label |
vector of labels. |
list.ML |
list of ML (must-link) constrained pairs. |
list.CNL |
list of CNL (cannot-link) constrained pairs. |
measureConstraintsOk returns the rates of constraints satisfaction
The function returns a list containing:
ML |
rate of ML (must-link) constraints satisfaction. |
CNL |
rate of CNL (cannot-link) constraints satisfaction. |
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
ML <- list()
ML[[1]] <- c(sel="10",mem="20")
ML[[2]] <- c(sel="60",mem="70")
CNL <- list()
CNL[[1]] <- c(sel="30",mem="80")
CNL[[2]] <- c(sel="90",mem="120")
sim <- computeGaussianSimilarity(dat, 1)
res <- KwaySSSC(sim, K=0, list.ML=ML, list.CNL=CNL)
measureConstraintsOk(res$label, list.ML=ML, list.CNL=CNL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.