Distance between vectors in a high dimensional space

190 Views Asked by At

this is my first post on this exchange so please be nice :)

Here goes: I applied a dimensionality reduction technique called "Linear Discriminant Analysis" (LDA) on a dataset to reduce it's high dimensionality. In this subspace I want to be able to find which class vectors are the most closely related (the hardest to differentiate). For this purpose I need to find the minimum distance between all the distances between these class vectors.

So my question boils down to: "how do I compute distances between vectors in a high dimensional case?"

EDIT: The context is facial recognition. I am using a type of LDA by Fisher to extract features from images (reducing the dimensionality and maximizing the distances between different classes, while minimizing the within class-scatter) and then I apply Classification with a simple kNN approach (looking at the neighbours in the subspace)

EDIT2: After performing Fisher's LDA, I have c class vectors (c here is equal to the number of persons in my dataset). I want to perform classification in this space. I want to see which classes are closely related because these classes (let's say faces) will be hard to differentiate between and accurate classification between these two faces will be hard.

1

There are 1 best solutions below

0
On

If

$$ {\bf x} = \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{pmatrix} $$

with a similar expression for ${\bf y}$, then you can define the distance as

$$ |{\bf x} - {\bf y}|_2 = \left[\sum_{k=1}^n(x_k - y_k)^2\right]^{1/2} $$

This is a 2-norm (hence the subscript), you can use numerically cheaper distances, such as the 1-norm

$$ |{\bf x} - {\bf y}|_1 = \sum_{k=1}^n|x_k - y_k| $$