0
$\begingroup$

For an assignment I have to compute the intra-class distance and use it as an objective function to select features. This is for the MNIST dataset.

While I have a fairly good handle on other aspects of this assignment, the term intra-class distance is confusing to me. Google does not result in any concrete answers either.

I understand intra would mean within, but that's exactly what is confusing to me: how can distance be within? Is it the distance of each measurement with another?

For example, I have N measurements for Class C. Is intra-class distance the distance from n to N-1 measurements within that class?

$\endgroup$
2
$\begingroup$

Intraclass distance is the distance between two points that are in the same class.

In your example, an intra-class distance is the distance between measurements $X_i$ and $X_j$ where $(i,j \in 1 \cdots N)$, and $X_i$ and $X_j$ are members of class C. One usually takes an average over the distances from all possible $(i,j)$ pairs within class C, and use it as the objective function. You can also use the distance between $X_i$ and $\bar{X}_C$ (the average coordinate of all measurements in class C), and take the average of this over all measurements in class C.

In contrast, an inter-class distance is the distance between measurements $X_i$ and $X_j$, where $X_i$ and $X_j$ are members of different classes.

$\endgroup$
  • $\begingroup$ Thank you! I note that you mention one usually takes an average over the all the pairwise distances from class C. My assignment states that "Implement a forward search algorithm using the Intra-class distance (defined by the mean of each class)" - does this mean I take the distance of each point from the mean? $\endgroup$ – saad Mar 6 at 18:20
  • 1
    $\begingroup$ Yes. It means what you said. $\endgroup$ – LambdaPsi Mar 6 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.