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

Algorithm 2.

Showcasing the Major Working Steps of RDKST.

1: Inputs: Dataset, D=i=1M(Xi,Yi), Meta classifiers = LG
2: Outputs: Classify whether the thyroid is affected or not
3: D(a)D.drop ([TBG], 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: Basepred ← concatenate (BC1,BC2,andBC3)
17: fori=1;i<M;i++do
18: Apply Basepred to classify training instances Xi
19: XiBasepred (Xi)
20: InputLG ← (Xiδ, Yi), where Xiδ ← (X1i,.XMi)
21: end for
22: RDKSTLG {InputLG}
23: ResultRDKST. predict (New−sample)
24: ReturnResult