|
Algorithm 5 Initialize population. |
Require: {Number of categorical input attributes} Require:
, , {Number of categories for the input attributes} Require:
, {Number of classes for the output attribute} Require:
{Number of crossing operators} Require:
{Number of mutation operators} Require:
{Maximum number of rules} Require:
{Number of individuals in the population}
-
1:
-
2:
for to N
do
-
3:
new Individual
-
4:
if
then
-
5:
-
6:
else
-
7:
Int Random(w,)
-
8:
end if
-
9:
{Random rule }
-
10:
for
to
do
-
11:
{Random integer values associated with the antecedents}
-
12:
for
to p
do
-
13:
Random(1,)
-
14:
end for
-
15:
{Random integer value associated with the consequent}
-
16:
if
then
-
17:
-
18:
else
-
19:
Random(1,w)
-
20:
end if
-
21:
end for
-
22:
{Random integer values for adaptive variation}
-
23:
Random(0,)
-
24:
Random(0,)
-
25:
-
26:
end for
-
27:
returnP
|