In this post, I will discuss the calculation of K-Nearest Neighbor with Minkowski Distance using 5 criteria.
The classification that will be discussed is the Classification of Scholarship Recipients.
The data we will use is:
- Consists of 10 data
- Consists of 5 criteria
- K = 5
- r Minkowski = 3
Information :
- Which will be categorized consists of Mathematics scores, Indonesian scores, English scores, Science scores and Non-Academic scores.
- Status consists of Not Qualified and Qualified.
- What we will classify is Name = See, Mathematics Score = 81, Indonesian Score = 86, English Score = 79, Science Score = 93 and Non Academic Score = 87, Status = ?
Calculation (formula to be used) :
- 79 is Alan's Math score
- 81 is See's Math score
- 88 is Alan's Indonesian score
- 86 is See's Indonesian score
- 72 is Alan's British value
- 79 is See's British value
- 92 is Alan's Science score
- 93 is See's Science score
- 97 is Alan's Non-Academic score
- 87 is See's Non-Academic score
- Then do the same calculations on data belonging to Dani, Rey and so on.
- 1/3 is the power for Minkowsky's formula
Then the calculation will be obtained as follows :
After that, do the ranking from the smallest to the largest value, the results obtained are as follows :
After getting the ranking, we can ensure that on behalf of See is eligible to receive a Scholarship or Not Eligible to receive a Scholarship.
Explanation :
- If using K = 1 then the result is not eligible because Moon the result is not eligible.
- If using K=3 then the result is not eligible because Moon, Eks and Alan the results are not eligible (3 are not eligible).
- If using K=5, the result is not eligible because Dani is eligible, while Moon, Eks, Alan and Zet are not eligible (full requirements totaling 1 and not fulfilling requirements totaling 4).
So the final result See does not meet the requirements
Notes :
- The value of K is independent (try to have an odd number so it doesn't confuse us when there are the same number of voting results).
Tidak ada komentar:
Posting Komentar