Skip to contents

Main functions

All metrics can be retrieved via the following six main wrapper functions.

getEmbeddingMetrics()
Compute embedding-based metrics
getGraphMetrics()
Compute graph-based metrics
getPartitionMetrics()
Compute partition-based metrics
getFuzzyPartitionMetrics()
Compute external metrics for fuzzy clusterings
getSpatialExternalMetrics()
Compute external metrics for spatial data
getSpatialInternalMetrics()
Compute internal metrics for spatial data

Functions for individual metrics

These are some useful functions for calculating individual metrics.

Embedding metrics

CDbw()
Calculate CDbw index
dbcv()
Calculate DBCV Metric

Fuzzy metrics

fuzzyHardMetrics()
Compute fuzzy-hard versions of pair-sorting partition metrics
fuzzyPartitionMetrics()
Compute fuzzy-fuzzy versions of pair-sorting partition metrics

Internal metrics for spatial domain detection

PAS()
Calculate PAS score
CHAOS()
Calculate CHAOS score
ELSA()
Calculate ELSA scores

Element-wise external metrics for spatial domain detection, particularly useful for visualizations.

fuzzyHardSpotConcordance()
Per-element maximal concordance between a hard and a fuzzy partition
fuzzySpotConcordance()
Per-element concordance between two fuzzy partitions
getPairConcordance()
Per-element pair concordance score
getNeighboringPairConcordance()
Per-element local concordance between a clustering and a ground truth

Datasets

The package provides several datasets for demonstration purposes.

noisy_moon
The noisy moon dataset
sp_toys
Toy examples of spatial data
toyExamples
Toy embedding examples
metric_info
Metrics Information

Other utility functions

mockData()
Generate mock multidimensional data
matchSets()
Match two partitions using Hungarian algorithm
knnComposition()
Compute neighborhood composition
getFuzzyLabel()
Get fuzzy representation of labels
findSpatialKNN()
Find the k nearest spatial neighbors
emb2knn()
Computes k nearest neighbors from embedding
emb2snn()
Computes shared nearest neighbors from embedding