Research Article
Diabetes Mellitus Disease Prediction Using Machine Learning Classifiers with Oversampling and Feature Augmentation
Algorithm 4
K-nearest neighbor (KNN).
| Invalue: Value that is n-dimensional, X1 ϵ R1n1 and outvalue (target), Y1 ϵ R1 | | Outvalue: The pp, P1 ∈ [0, 1] of test data (unseen), x, | | , C1 = 2 (diabetes present (C1) or not (C2)) | (1) | The geometric distances are calculated, | | | | D1h1 for k1 query points, where X1i1 = current instance, x1i1 = query instance, q1 = order | (2) | Establish set S1 with k1 points (closest) | (3) | Estimate the pp, P1 for each class | | | | f 1(x1) is the function to class assignment. | | pp means posterior probability. |
|