findk2: Finding the well-seperated clusters in a dataset

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/findk2.R

Description

Counts the rectangular blocks by moving the diagonal of a binary image. The count is returned as the estimation of the number of well-separated clusters for the given dataset.

Usage

1
findk2(img, disp=TRUE)

Arguments

img

A binary image matrix of dissimilarities. It is produced by using the function binimage.

disp

A logical value whether the binary image will be displayed or not. The default value is TRUE.

Details

This function counts the overlapped rectangle blocks as one block.

Value

k

Number of clusters

Author(s)

Zeynel Cebeci

References

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)

See Also

binimage, findk, genbinimg, greyimage, vatimage, vatdisp

Examples

1
2
3
4
5
6
7
8
9
# Load the dataset protcarbo 
data(protcarbo) 
# Obtain the ODM matrix for VAT analysis
vatmat <- vatimage(protcarbo, disp=TRUE)$odm
greymat <- greyimage(vatmat, greylevel=256)
binmat <- binimage(greymat, method="otsu")$binimg
# Find the number of clusters
k <- findk2(binmat, disp=TRUE)
cat("Number of clusters detected:", k, "\n")

zcebeci/VatAna documentation built on Dec. 25, 2019, 7:07 p.m.