Learn R Programming

sits (version 1.12.0)

sits_cluster_validity: Cluster validity indices

Description

Compute different cluster validity indices. This function needs as input a sits tibble with `cluster` column. It is a front-end to `dtwclust::cvi` function. That function computes five indices: 1) adjusted Rand index; 2) Rand index; 3) Jaccard index; 4) Fowlkes-Mallows; and 5) Variation of Information index Please refer to the documentation in that package for more details.

Usage

sits_cluster_validity(data.tb)

Arguments

data.tb

A tibble with `cluster` column.

Value

A vector with four external validity indices.

References

"dtwclust" package (https://CRAN.R-project.org/package=dtwclust)

Examples

Run this code
# NOT RUN {
# Load the "dtwclust" package
library(dtwclust)
# load a simple data set with two classes
data(cerrado_2classes)
# calculate the dendrogram
dendro.obj <- sits_dendrogram (cerrado_2classes, bands = c("ndvi"))
# include the cluster info in the sits tibble
clustered.tb <- sits_cluster (cerrado_2classes, dendro.obj, k = 6)
# computes its external validity indexes
sits_cluster_validity(clustered.tb)
# }

Run the code above in your browser using DataLab