Distancei
Distancei is a context-aware dissimilarity measure used in data analysis and machine learning to quantify how different two points are, with the measure adapted to the specific context or task. Unlike fixed distance metrics, distancei allows the importance of features to vary by context, enabling more flexible similarity evaluation across domains such as clustering, retrieval, and anomaly detection.
Formally, for a context i, distancei between x and y in R^n is defined as D_i(x,y) = sqrt(
Properties: If A_i is positive semidefinite, D_i is a metric, satisfying non-negativity, identity of indiscernibles, symmetry,
Learning and usage: Contextual matrices A_i or weights w_k,i are typically learned from labeled data using metric
Examples and limitations: In a dataset with two relevant features, A_i could emphasize the first feature in
See also: distance, metric, Mahalanobis distance, metric learning, contextual similarity.
---