0% found this document useful (0 votes)
6 views2 pages

CA Classifier Training Algorithm Pseudocode

The document outlines a pseudocode algorithm for training a Cellular Automaton (CA) classifier using two attractor CA rules. It initializes various parameters, iterates through rules and datasets to compute the accuracy of attractors, and updates the maximum accuracy found. The final output includes the CA with the highest accuracy and the corresponding training sets of attractors.

Uploaded by

rajapple345
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

CA Classifier Training Algorithm Pseudocode

The document outlines a pseudocode algorithm for training a Cellular Automaton (CA) classifier using two attractor CA rules. It initializes various parameters, iterates through rules and datasets to compute the accuracy of attractors, and updates the maximum accuracy found. The final output includes the CA with the highest accuracy and the corresponding training sets of attractors.

Uploaded by

rajapple345
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

You might also like