Calculation of distance between samples in data mining I am confused about a little issue related to distance calculation. What I want to know is, while calculating the distance between samples in classification or regression, is the label or output class also used or the distance is calculated using all other attributes excluding the label attribute?
The way that various distances are often calculated in Data Mining is using the Euclidean distance. You can read about that further here. If I understand your question correctly, the answer is no. The Euclidean distance can only be calculated between two numerical points. Therefore it would not be possible to calculate the distance between a label and a numeric point.