# What is Intraclass Distance?

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?

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.