Skip to main content
. 2021 Sep 10;7:e676. doi: 10.7717/peerj-cs.676

Algorithm 3. ConstructAntRules(c, Prob).

1: Set g2.Generation counter
2: while g ≠ |attributes| And coverageminCoverage do
3:  Set MultiRulesϕMulti-term rules
4:  Set t1 Ant index Ant index
5:  repeat
6:   Let ant t construct a maximum of g-term rule such that (rule => c) using selection probability prob.
7:   Set tt+1
8:  until t > noO f Ants
9:  for Each rule constructed by ants do
10:   Calculate support and confidence of rule
11:   if supportminSupp And ≥ minConf then
12:    Set MultiRulesMultiRulerule
13:   end if
14:  end for
15:  Set coveragefind_coverage(multiRules).
16:  Update pheromone.
17:  Set gg+1
18: end while
19: return MultiRules