Skip to main content
. 2019 Nov 18;5:e188. doi: 10.7717/peerj-cs.188

Table 1. Pseudo code of the proposed method.

This pseudo code supposes that we have training input, training output, test input, validation input and validation output. The code shows that how we build a rule-based classifier and determine the test data output.

For i = 1 to K fold
Determine Traininput, Trainoutput, Testinput, Testoutput, Valinput and Valoutput
Finalrules={};
For j = 1 to number_class
Rulesj= apply Apriori algorithm(traininput, Minsupj,Minconj,class j )
Finalrules= append Rulesj to Finalrules
End %for j
Selected_rules=Apply harmony search algorithm (Finalrules, Traininput, Trtainoutput, Valinput, Valoutput)
Testoutput= apply selected_rules on Testinput
End %for i