findThreshold(dmat, groups, distances, method = "mutinfo", prob = 0.5, na.rm = FALSE, keep.dists = TRUE, roundCuts = 2, minCuts = 20, maxCuts = 300, targetCuts = 100, verbose = FALSE, depth = 1, ...)
partition(dmat, groups, include, verbose = FALSE)dmat.partition provided in the
place of dmat and groupsNA elements in groups and
corresponding rows and columns in dmat. Ignored if
distances is provided.distances
element (output of partition).minCuts and maxCuts are not met (see Details).findThreshold, output is a list with elements
decsribed below. In the case of partition, output is the data.frame
returned as the element named $distances in the output of
findThreshold.data.frame with columns x and y
providing candidiate breakpoints and corresponding mutual information
values, respectively.keep.distances is TRUE, a data.frame
containing pairwise distances identified as within- or between classes.method.findThreshold is used internally in classify, but
may also be used to calculate a starting value of $D$.partition is used to transform a square (or lower triangular)
distance matrix into a data.frame containing a column of
distances ($vals) along with a factor ($comparison)
defining each distance as a within- or between-group
comparison. Columns $row and $col provide indices of
corresponding rows and columns of dmat.
plotDistances, plotMutinfodata(iris)
dmat <- as.matrix(dist(iris[,1:4], method="euclidean"))
groups <- iris$Species
thresh <- findThreshold(dmat, groups, type="mutinfo")
str(thresh)
Run the code above in your browser using DataLab