Skip to main content
. 2020 Jan 17;13:1396. doi: 10.3389/fnins.2019.01396

Algorithm 1.

Covering Strategy

Input: E+ (set of positive examples), E (set of negative examples)
Output: H (A set of GEP-based rules)
1:  /* Initialization */
2:  H ← ∅
3:  Lmin ← +∞ (minimum description length obtained)
4:  LH ← 0 (current description length)
5:  Ltheory ← 0 (theory bits)
6:  
7:  /* Learning */
8:  Repeat
9:          Learn a rule R to cover the positive samples in E+
10:        E+E+−{s ∣ s can be covered by R}
11:        /* Pruning */
12:        LtheoryLtheory + number of bits for encoding R
13:        Lexception(H) ←number of bits for encoding current exceptions
14:        LH ← 0.5·Ltheory + Lexception(H)
15:        If (LH < Lmin) Then
16:            HH∪{R}
17:        Else
18:            Termination
19:        /* Update */
20:        If (Lmin > LH) Then
21:            LminLH
22:  Until E+ = = ∅