Use the K-NN algorithm to classify the new data in the excel file Credit Approval Decisions Coded using only credit score and years of credit history as input variables.
We're only allowed to use excel or analytic solver to answer problems. I don't know what python is.
Homeowner | Credit Score | Years of Credit History | Revolving Balance ($) | Revolving Utilization (%) | Decision |
Y | 592 | 3 | 21000 | 15 | Reject |
N | 653 | 8 | 4000 | 90 | Reject |
Y | 576 | 1 | 8500 | 25 | Reject |
N | 733 | 4 | 16300 | 70 | Approve |
N | 726 | 13 | 2500 | 90 | Approve |
Y | 675 | 14 | 16700 | 18 | Approve |
K nearest neighbors:
Find the euclidean distance between the new values and all of the old values.
Eg. If the new Credit Score = 633
Years of Credit History = 3
You have a set (633,3). This is (X2,Y2)
Euclidean distance = SQRT ((X1-X2)^2+ (Y1-Y2)^2)
So for row 1, Euclidean Distance = SQRT ((592-633)^2 + (3-3)^2) = 41
Look at the screenshot below:
This should be clear Let me know in case you have any questions.
Get Answers For Free
Most questions answered within 1 hours.