Step 1. Read and preprocess (discrete the continuous feature) the data. |
Step 2. Set the minimum support and confidence (minSupport, minConfidence), |
maximum rule length max_long, clone size , mutation probability and so forth; meanwhile initialize immune |
network net_M, weight vector , set the initial value of to 1, ( is the number of categories of data). |
Step 3. Network evolution |
3.1: Generate candidate rule set candidatei of the training samples, (which contains all the |
rules that have a length of 2, meets the minimum support value rule), and choose a certain amount |
of rules with the highest confidence value from candidates as the initial immune cells to be added |
into , set the number of iterations: iteration = 0, coverage: coverage = 0, the number of generation |
with stable coverage: no_change = 0; |
3.2: Calculate the affinity values of immune cells in , and sort them in descending order by affinity values; |
3.3: Clone from the immune cells of , clone number and the affinity is proportional; |
3.4: Super variate each individual in ; each individual only variates on one position, the group variated is noted ; |
3.5: Calculate support and confidence of each individual in ; and add the individuals which |
meet the minimum support and confidence rule and cover at least one or more (includes one) |
training samples in the category as the memory cells to net ; then remove these immune cells |
from , add their corresponding confidence values to the weight vector , and update coverage; |
3.6: Replace the original immune cells in with the immune cells in , then performs the pruning operation; |
3.7: net_M performs the network suppression; |
if iteration is an integer multiple of some integer, |
then |
reduce the minimum confidence value, select parts of rules randomly from for |
adding to in order to maintain the diversity of immune cells; |
end if |
if the value of coverage increases, |
then |
no_change = 0; |
iteration = iteration + 1; |
else |
iteration = iteration + 1; |
no_change = no_change + 1; |
end if |
if (coverage == 1 ∥ iteration == 50 ∥ no_change == 10) |
then |
; |
if |
then |
go to Step 4; |
else |
go to Step ; |
end if |
end if |
Step 4. Output network |