Skip to main content
. 2020 Dec 17;3:559927. doi: 10.3389/frai.2020.559927

Algorithm 3.

Q-Finder’s iterative top-k selection based on subgroups’ intensions

Input: k maximum number of selected subgroups,
Granked set of ranked generated subgroups, with complexities ranging from Cmin to Cmax
δES minimum delta to consider that a subgroup has a higher effect size11
Gsplit= splitByComplexity(Granked) # split Granked by subgroup complexity (Gsplit[1] corresponds to complexity 1, Gsplit[2] to complexity 2, …)
Sk={} # Initialize Sk, the set of top candidate subgroups
For c=Cmin to Cmax do
For g in Gsplit[c] do # g: candidate subgroup
  If p-value(g) > max(p-values(Sk)) and size(Sk)==k then continue to next c
  For s in Sk do # s: subgroup in the top-k
   If redundant(g,s) then
    If complexity(g) == complexity(s) then
     continue to next g
    If complexity(g) > complexity(s) then
     If EffectSize(g) EffectSize(s)δES then
     continue to next g
  For s in Sk do
   If redundant(g,s) and complexity(g) > complexity(s) and
   EffectSize(g) > EffectSize(s)δES and p-value(g) < p-value(s) then
    Sk=Sk\{s}
  Sk=Sk{g}
  while size(Sk) > k do
   Sk=Sk\{subgroup from Sk with the highest p-value}
Output: Sk # top-k best candidate subgroups