Description Usage Arguments Details Value Author(s) References See Also Examples
Counts the well-separated and overlapped rectangular blocks tracing their edges. The count is proposed as the number of clusters for the given dataset.
1 |
img |
A numeric binary image matrix of the ordered dissimilarities. It can be produced by using the function binimage of the package. |
disp |
A logical value whether the binary image will be displayed or not. Default is TRUE. |
Tracing the edges starts with the first cell on the last row of binary image matrix. The functions detects the corners of blocks and then changes the moving direction.
k |
Number of clusters |
edges |
Vector of the detected directions for the edges of rectangle blocks. |
Zeynel Cebeci
Cebeci, Z. & Yildiz, F. (2015). Gorsel Kumelenme Egilimi Degerlendirmesi ve R'de Uygulamasi. Cukurova Universitesi Ziraat Fakultesi Dergisi, 30(2):1-8. (URL: https://dergipark.org.tr/en/download/article-file/219860)
binimage
,
findk2
,
genbinimg
,
greyimage
,
vatimage
,
vatdisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Generate a binary image having 6 rectangle blocks over its diagonal.
binmat <- genbinimg(nb=6, disp=FALSE)$binimg
k <- findk(binmat, disp=TRUE)$k
cat("Number of clusters detected:", k, "\n")
# Load the dataset protocarbo
data(protcarbo)
# Obtain the VAT matrix
vatmat <- vatimage(protcarbo, disp=FALSE)$odm
greymat <- greyimage(vatmat, greylevel=256)
binmat <- binimage(greymat, method="auto")$binimg
# Find the number of clusters
k <- findk(binmat, disp=TRUE)$k
cat("Number of clusters detected:", k, "\n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.