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 .

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1339 views
  • 2 likes
  • 3 in conversation