Measure reference¶
ZADU exposes 22 measures. Short aliases and full module IDs are accepted by
ZADU; the tables below use the short aliases intended for specifications.
Ranges describe ZADU's outputs. “Best” gives the target value for the
property being measured, not a guarantee that the whole projection is faithful.
n is the sample count. Parameters and input restrictions follow the tables.
nh, dsc, ivm, and c_evm evaluate a projection against class labels.
ca_tnc, l_tnc, and cadi compare class-related structure between spaces.
All seven require a label for each row.
Local measures¶
| Measure and paper | ID | Return keys | Range; best |
|---|---|---|---|
| Trustworthiness & Continuity Venna & Kaski (2006) |
tnc |
trustworthiness, continuity |
[0, 1]; 1 |
| Mean Relative Rank Error Lee & Verleysen (2009) |
mrre |
mrre_false, mrre_missing |
[0, 1]; 1 |
| Local Continuity Meta-Criteria Chen & Buja (2009) |
lcmc |
lcmc |
[-k/(n-1), 1-k/(n-1)]; 1-k/(n-1) |
| Neighborhood Hit Paulovich et al. (2008) |
nh |
neighborhood_hit |
[0, 1]; 1 |
| Neighbor Dissimilarity Fujiwara et al. (2023) |
nd |
neighbor_dissimilarity |
non-negative; 0 |
| Class-Aware Trustworthiness & Continuity Colange et al. (2020) |
ca_tnc |
ca_trustworthiness, ca_continuity |
[0, 1]; 1 |
| Procrustes Measure Goldberg & Ritov (2009) |
proc |
procrustes |
non-negative; 0 |
Cluster-level measures¶
| Measure and paper | ID | Return keys | Range; best |
|---|---|---|---|
| Steadiness & Cohesiveness Jeon et al. (2021) |
snc |
steadiness, cohesiveness |
[0, 1]; 1 |
| Distance Consistency Sips et al. (2009) |
dsc |
distance_consistency |
[0, 1]; 1 |
| Internal Validation Measure Silhouette, Calinski-Harabasz, Davies-Bouldin |
ivm |
selected measure name | depends on selection; depends on selection |
| Clustering + External Validation Adjusted Rand, AMI/NMI, V-measure |
c_evm |
{clustering}_{measure} |
depends on selection; depends on selection |
| Label Trustworthiness & Continuity1 Jeon et al. (2024) |
l_tnc |
label_trustworthiness, label_continuity |
[0, 1]; 1 |
| Class Angular Distortion Index Gunaratne et al. (2026) |
cadi |
class_angular_distortion_index |
[0, 1]; 0 |
Global measures¶
| Measure and paper | ID | Return keys | Range; best |
|---|---|---|---|
| Stress Kruskal (1964a), (1964b) |
stress |
stress |
non-negative; 0 |
| Non-Metric Stress Kruskal (1964) |
nm_stress |
non_metric_stress |
non-negative; 0 |
| Scale-Normalized Stress Smelser et al. (2024) |
sn_stress |
scale_normalized_stress |
non-negative; 0 |
| Kullback-Leibler Divergence Hinton & Roweis (2002) |
kl_div |
kl_divergence |
non-negative; 0 |
| Distance-to-Measure Chazal et al. (2011) |
dtm |
distance_to_measure |
non-negative; 0 |
| Topographic Product Bauer & Pawelzik (1992) |
topo |
topographic_product |
real-valued; 0 |
| Pearson correlation Pearson (1895) |
pr |
pearson_r |
[-1, 1]; 1 |
| Spearman rank correlation Spearman (1904) |
srho |
spearman_rho |
[-1, 1]; 1 |
Pearson and Spearman use each unique off-diagonal distance once. Their distance vectors must have nonzero variance.
Gap-based regional measure¶
| Measure and paper | ID | Return keys | Range; best |
|---|---|---|---|
| Gap Index2 Ros et al. (2026) |
gi |
gap_index |
[0, 1]; 0 |
Gap Index measures distortion in empty triangular regions of a two-dimensional projection. See the dedicated guide for regional output.
Parameters and input restrictions¶
Neighborhood size¶
tnc, mrre, lcmc, nh, ca_tnc, nd, topo, and proc default to
k=20. Set an integer with 1 <= k < n; T&C and class-aware T&C require
k < n / 2. Thus their default k=20 needs at least 41 samples.
ZADU returns MRRE as one minus normalized rank error, so larger values are
better. LCMC's upper bound is 1 - k / (n - 1), not 1. Topographic Product is
signed; closeness to zero, rather than a larger raw value, indicates its target.
Density bandwidth¶
dtm and kl_div use sigma=0.1, which must be positive. Each space's distances
are divided by their maximum before applying the kernel
exp(-(distance / maximum_distance)**2 / sigma). Choose sigma for the
density scale you want to compare, and keep it fixed across projections.
Steadiness and Cohesiveness¶
| Parameter | Default | Meaning |
|---|---|---|
iteration |
150 |
Number of sampled iterations |
walk_num_ratio |
0.3 |
Walk count relative to the number of samples |
alpha |
0.1 |
Positive offset in the similarity-to-distance conversion 1 / (similarity + alpha) |
k |
omitted | Uses floor(sqrt(n)); pass an integer to override |
clustering_strategy |
"dbscan" |
Cluster extraction strategy; also accepts "kmeans" and "N-means" for an integer N |
random_state |
None |
Seed or NumPy generator |
n_jobs |
1 |
Iteration workers; collection execution may reduce this to avoid nested ZADU workers |
CADI¶
n_triplets=0 selects 10 * n sampled triplets; a positive integer selects an
explicit count. random_seed=None uses a new random generator. Set an integer
seed for repeatable samples. At least two classes are required, and one class
must contain at least two samples.
Gap Index¶
metric="euclidean" measures original-space triangle edges. See the
Gap Index guide for other distance functions, precomputed
distances, and regional output.
Degenerate inputs¶
Requirements depend on the measure. T&C can handle duplicate points using
stable index ties; that does not make duplicate or constant inputs valid for
every other measure. Pearson and Spearman require nonconstant distance values.
Stress requires nonzero original distances; scale-normalized stress,
non-metric stress, and density measures require nonzero distances in both spaces.
Procrustes requires
nonzero variance in each original neighborhood; Topographic Product requires
positive distances in its ratios. IVM requires between 2 and n - 1 classes.
String-valued options¶
Internal validation¶
ivm accepts silhouette, calinski_harabasz, or davies_bouldin as its
measure. Silhouette ranges from −1 to 1 (higher is better),
Calinski–Harabasz is non-negative (higher is better), and Davies–Bouldin is
non-negative (lower is better).
Clustering and external validation¶
c_evm accepts:
measure:arand,ami,nmi, orvmeasureclustering:kmeansordbscan
With clustering="kmeans", n_clusters defaults to the number of unique
labels and random_state defaults to 0. Override them through
clustering_args. All four validation scores are higher-is-better, with 1
indicating agreement. Adjusted Rand and adjusted mutual information may be
negative; normalized mutual information and V-measure range from 0 to 1.
DBSCAN's noise label is passed to the selected scorer along with cluster labels.
Label trustworthiness and continuity¶
l_tnc accepts dsc or ch_btw as its cvm.
Invalid option strings raise ValueError with the allowed values.
Pointwise return keys¶
With return_local=True, the runner returns (global_scores, local_scores).
Both lists follow specification order; unsupported local entries are None.
The local dictionaries use the keys below. Each value is an array of length n.
| ID | Local return keys |
|---|---|
tnc |
local_trustworthiness, local_continuity |
mrre |
local_mrre_false, local_mrre_missing |
lcmc |
local_lcmc |
nh |
local_neighborhood_hit |
ca_tnc |
local_ca_trustworthiness, local_ca_continuity |
snc |
local_steadiness, local_cohesiveness |
The primary references for the original 17 ZADU measures follow Table 1 of the ZADU paper. Later additions link to the publications that introduced them.
-
ZADU uses its normalized DSC directly in label T&C; it does not apply the paper's DSC rescaling step. ↩
-
Introduced by Jaume Ros, Alessio Arleo, and Fernando Paulovich. ZADU's adaptation retains the upstream MIT license and pinned provenance; see the third-party notice. ↩