Example of K Nearest Neighbors with Continuous Response
1.
Select Help > Sample Data Library and open Body Fat.jmp.
2.
Select Analyze > Predictive Modeling > K Nearest Neighbors.
3.
Select Percent body fat and click Y, Response.
4.
Select Age (years) through Wrist circumference (cm) and click X, Factor.
5.
Select Validation and click Validation.
6.
K Nearest Neighbors Report
The K = 8 model had the lowest RMSE for the Validation set. Among k nearest neighbor models, the model based on 8 nearest neighbors seems to perform the best.

Help created on 9/19/2017