Pseudocode: CA Classifier Training Algorithm
Input: n(Size of CA);
‘Assumption: Rule List-Considering only single length cycle
‘Two attractor CA (TACA) rules
Output: CA as clasifier, attrSety, attrSet»
Data: Dataset-1 (Datasets) and Dataset-2 (Datasets)
Set count =0 _// Initialization of the counter for the
convergence of 3 pattern to an attractor
Set maxAecuracy = 0
11 Initialize maxdccuracy variable for computing maxinun
accuracy of all classifiers
for each rule in the rule list do
for each fixed point attractor inthe rule set do
for cach pattern 'p’ in each dataset Dataset, and
Datasets do
‘The CA is initialized with an initial
configuration 'p’
Ierate the CA until it converges to any fixed
point attractor, say Attr from Dataset and
Dataset,
Let num and numd be the number of attractors
that are mapped to a fixed point attractor Attr
from Dataset, and Dataset» respectively.
if numi > num? then
‘ount + num and assign Attr in
1) Atte aterSet
else
‘count = count + num2 and assign Attr in
attrSet 1) Atte © attrSet,
11 Aecuracyz(Mumber of patterns correctly
identified)/(Total number of patterns in the dataset)
‘maxAccuracy = Accuracy
if maxAccuracy < Accuracy then
‘maxAccuracy = Accuracy
| 11 Cateutatingthemaximumaccuracy
Return the CA with maximum accuracy and training set of
attractors attrSetjand attrSety