Information Technology Reference
In-Depth Information
The GA searches for the genome which maximizes
f
.
Algorithm 1
Single Variable Classifier algorithm (SVC)
Require:
x
app
: Value of the variable for the training set examples,
x
test
: Value of the variable for the test set examples,
y
app
: True labels of the training set examples,
y
test
: True labels of the test set examples,
nb
test
: Number of individuals in the test set
Ensure:
Calculate a threshold T using
x
app
and a correct classification rate (CCR)
Calculus of the threshold T
(
y
app
)
It calculates the mean of
x
app
for the individuals of the first modality G
1
and the second
modality G
2
.
T
G
1
,
G
2
)
←
Average
(
x
app
,
G
1
+
G
2
←
2
Prediction and Correct classification rate
For
i= 1 to
nb
test
do
Pred
i
x
test
)
It predicts the class of the i
th
individual of the test set using the threshold T .
end for
CCR
←
Predict
(
T
,
y
test
)
It calculates the correct classification rate by comparing the prediction and true labels.
return
T
,
CCR
←
CalculateCCR
(
Pred
,
9.6.2.3 Stop Criterion
The algorithm stops if one of the following three conditions is satis
ed:
The number of iterations exceeds 1,000.
Parents are the same for 10 generations.
The number of differences among the parents is less than 3.
To calculate the number of differences for a given population, denoted
D
, the
genomes of the population at iteration
i
are stored in a matrix, denoted by
P
i
. Let
P
j
be the column
j
of the matrix
P
i
(where
j
=1,
…
, 16). Then
D
=
D
b
+
D
elec
where:
D
b
is the number of differences for the binary part of
P
j
(columns 2
16). The
-
P
j
number of differences
for
column
(where
j
=2,
…
, 16)
is
min
ð
number of 0 in P
j
number of 1 in P
j
Þ
,
.
D
elec
is the number of differences in
P
i
(column corresponding to the electrode
component). Then,
D
elec
is the number of individuals who have a electrode
which is different from the electrode most selected in the population.