Hi,
does anyone have a reference on how the distances will be calculated using the hotspot to save the distances into the data table in the following situations:
- Analyze -> Predictive Modeling -> K Nearest Neighbors -> "Variable" as "X,Faktor" -> OK -> Hotspot "Save Near Neighbor Distances"
- Analyze -> Screening -> Explore Outliers -> "Variable" as "Y, Columns" -> Multivariate: K Nearest Neighbor Outliers -> OK -> Buton "Save NN Distances"
Why am I asking:
- The results are not identical for both modules (see attached data table: "Distanz 1-4" are from 1. above, "Nächste 1 Distanz_OutlierModule 1-4" are from 2).
- None of these seem to calculate the euklidean distance (shouldn't be the first Nearest Neighbor Distance be 1 for all values/rows of variable)?) It seems that it has some calculation of the largest distance and then calculates the others based on their proportion part (0.25 as distance 1 and 1 as distance 4 (farest from variable value 1, so one forth of the max distance is the NN Distance saved, while I would expect 1,2,3,4 as NN distances for the first row in the data table). And in the modeling module the values are somehow similar (for the proportions) but different from the absolute values.
I saw the docmentation with a reference to: Hastie et al. (2009), Hand et al. (2001), and Shmueli et al. (2017). (Overview of the K Nearest Neighbors Platform ), where is mentioned it identifies the smallest Euclidean distances between the predictor values for that observation and the predictor values for each of the other observations. However, it does not explain to me the different results.