Skip to main content
. 2024 Aug 20;10(17):e36556. doi: 10.1016/j.heliyon.2024.e36556

Algorithm 1.

Showcasing the Major Working Steps of RDKVT.

1: Inputs: Dataset, D=i=1M(Xi,Yi)
2: Outputs: Classify whether the thyroid is affected or not
3: D(a)D.drop ([T BG], axis = columns)
4: D(b)MedianImpute {D(a)}
5: D(c)LabelEncoder {D(b)}
6: D(d)SMOTEENN {D(c)}
7: Xi,Yiinput {D(d)(N × M matrix)}, output (N × 1 vector)
8: Xtr7,Ytr7,Xte3,Yte3TrainTestSplit (Xi,Yi,0.3)
9: Xtr8,Ytr8,Xte2,Yte2TrainTestSplit (Xi,Yi,0.2)
10: Xtr9,Ytr9,Xte1,Yte1TrainTestSplit (Xi,Yi,0.1)
11: while (execute − different − TrainTestSets) do
12: BC(1)RandomForest (Xtri,Ytri,Ytei)
13: BC(2)DecisionTree (Xtri,Ytri,Ytei)
14: BC(3)KNearestNeighbors (Xtri,Ytri,Ytei)
15: end while
16: procedure RDKVT (Xtri,Ytri,Ytei)
17: RDKVT ← argmax (BC1,BC2,andBC3)
18: while (fitting – different − TrainTestSets)
19: RDKVT ← RDKVT.fit (Xtri,Ytri)
20: end while
21: ResultRDKVT. predict (New−sample)
22: ReturnResult