Title: | Locally Scaled Density Based Clustering |
---|---|
Description: | Implementation of Locally Scaled Density Based Clustering (LSDBC) algorithm proposed by Bicici and Yuret (2007) <doi:10.1007/978-3-540-71618-1_82>. This package also contains some supporting functions such as betaCV() function and get_spectral() function. |
Authors: | Fella Ulandari and Robert Kurniawan |
Maintainer: | Fella Ulandari <[email protected]> |
License: | GPL |
Version: | 0.1.0 |
Built: | 2024-11-14 02:57:34 UTC |
Source: | https://github.com/cran/lsdbc |
function to calculates the BetaCV.
betaCV(clust,dist)
betaCV(clust,dist)
clust |
Determine in which cluster a data is belonged. clust should be a numeric, 0 indicates a noise and cluster start at 1. |
dist |
Distance matrix |
BetaCV measures how well the clusters based on compactness (intra-cluster distance) and separability (inter-cluster distance). BetaCV is the ratio between the average of intra-cluster distance to the average of inter-claster distance. The smaller BetaCV value indicates the better the clustering.
This function returns the betaCV value.
Fella Ulandari and Robert Kurniawan
University of Illinois. (2020, January 10). 6.1 Methods for Clustering Validation. Retrieved from Coursera: https://www.coursera.org/lecture/cluster-analysis/6-1-methods-for-clustering-validation-k59pn
https://www.coursera.org/lecture/cluster-analysis/6-1-methods-for-clustering-validation-k59pn
x <- runif(20,-1,1) y <- runif(20,-1,1) dataset <- cbind(x,y) l <- lsdbc(dataset, 7,3,"euclidean") dmat <- as.matrix(dist(dataset,"euclidean")) betaCV(l$cluster,dmat)
x <- runif(20,-1,1) y <- runif(20,-1,1) dataset <- cbind(x,y) l <- lsdbc(dataset, 7,3,"euclidean") dmat <- as.matrix(dist(dataset,"euclidean")) betaCV(l$cluster,dmat)
Generate a dataset with spectral distribution.
get_spectral(n)
get_spectral(n)
n |
Number of data to be generated |
This function returns a dataframe with the spectral distribution
Fella Ulandari and Robert Kurniawan
Bicici, E., & Yuret, D. (2007). Locally Scaled Density Based Clustering. International Conference on Adaptive and Natural Computing Algorithms (pp. 739-748). Berlin: Springer.
##Generate 1000 data## get_spectral(1000)
##Generate 1000 data## get_spectral(1000)
Generate a locally scaled density based clustering as proposed by Bicici and Yuret (2007).
lsdbc(data, k, alpha, jarak = c("euclidean", "manhattan", "canberra", "geodesic"))
lsdbc(data, k, alpha, jarak = c("euclidean", "manhattan", "canberra", "geodesic"))
data |
Dataset consists of two variables (x,y) indicating coordinates of each data (point) |
k |
Number of neighbor to be considered |
alpha |
Parameter for determining local maximum |
jarak |
Type of distance to be used, the options are c("euclidean", "manhattan", "canberra", "geodesic") |
This function returns a list with the following objects:
data |
a dataframe of the dataset used. |
cluster |
an integer vector coding cluster membership, 0 indicates a noise and cluster start at 1. |
parameter |
consist of parameter k and alpha. |
Fella Ulandari and Robert Kurniawan
Bicici, E., & Yuret, D. (2007). Locally Scaled Density Based Clustering. International Conference on Adaptive and Natural Computing Algorithms (pp. 739-748). Berlin: Springer.
https://doi.org/10.1007/978-3-540-71618-1_82
x <- runif(20,-1,1) y <- runif(20,-1,1) dataset <- cbind(x,y) l <- lsdbc(dataset, 7,3,"euclidean") l
x <- runif(20,-1,1) y <- runif(20,-1,1) dataset <- cbind(x,y) l <- lsdbc(dataset, 7,3,"euclidean") l