A heads-up to those of you hoping to use kNN in JMP v16 with cross-validation...
The Word attachment indicates that, for k = 3:
| | Training R2 | Validation R2 |
| 2nd exhibit | 0.92839 | 0.90874 |
| 3rd exhibit | 0.9706 | 0.9086 |
The validation R2s are close, but not identical. Although this is minor, the difference in the training R2s is not: 0.93 vs 0.97.
Documentation about this issue is not available, although there is mention of the fact that the kNN algorithm produces different columns of predictions depending on whether Saved Predicteds or Save Prediction Formula is used, which most likely explains the discrepancy in fit statistics. However, we do not know which of the competing sets of fit statistics are correct.
We need accurate training R2s results to properly gauge the amount of overfitting exhibited by a model.
JMP v16 uses a new algorithm for kNN, so this discrepancy is not evidenced in JMP v15 or earlier.
I also attach the JMP data file used to produce the results shown in the Word document.