BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jonessas
Calcite | Level 5

Fit a KNN model to the Titanic Passengers dataset where "Survived" is the response and all other variables (except Name) are the predictor (X) variables. Set the validation to the validation column.  Set the K to 15, and the random seed to 125. Based on the results, what is the optimal K (enter the numerical answer, e.g., 3)

 

 

 

Titanic Passengers" JMP dataset

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
KNN model is an unsupervised model . and it has nothing to do with Y/response variable ("Survived" ).
about your Q, K is difficult to decide , my opinion is using Principle Component Analysis to plot a X-Y scatter graph by first two principle component . and Check how many clusters should be divided.
@Rick_SAS wrote a blog about it .

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

You should probably post this in the JMP Communities.

--
Paige Miller
jonessas
Calcite | Level 5

Can you tell how to get to the JMP community, this is my first time.

PaigeMiller
Diamond | Level 26

I provided a link to the JMP Community.

--
Paige Miller
Ksharp
Super User
KNN model is an unsupervised model . and it has nothing to do with Y/response variable ("Survived" ).
about your Q, K is difficult to decide , my opinion is using Principle Component Analysis to plot a X-Y scatter graph by first two principle component . and Check how many clusters should be divided.
@Rick_SAS wrote a blog about it .

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1450 views
  • 2 likes
  • 3 in conversation