Information Technology Reference
In-Depth Information
Function. Crossover( M a ,
M b )
Input : two model structures M a , M b
Output : resulting two model structures M a , M b after crossover
K a ,K b number of classifiers in M a , M b
1
M a , M b matching function sets from M a , M b
2
M a M a M b
3
K b random integer K such that 1 ≤ K<K a + K b
4
M b ←∅
5
for k =1 to K b do
6
m k randomly selected matching function from M a
7
M b M b ∪{m k }
8
M a M a \ m k
9
M a , M b ←{K a + K b − K b , M a }, {K b , M b }
10
M a ,
M b
return
11
Starting with an initial population of P randomly generated individuals, a
single iteration of the genetic algorithm is performed as follows: firstly, the mat-
ching matrix M is determined after (8.1) for each individual, based on its re-
presentation of the matching functions and the input matrix X .Thismatching
matrix is subsequently used to determine each individual's fitness by calling
ModelProbability . After that, a new population is created by selecting two
individuals from the current population and applying crossover with probability
p c and mutation with probability p m . The last step is repeated until the new
population again holds P individuals. Then, the new population replaces the
current one, and the next iteration begins.
An individual is initially generated by randomly choosing the number of clas-
sifiers it represents, and then initialising the matching function of each of its
classifiers, again randomly. How these matching functions are initialised depends
on the representation and is thus discussed later. To avoid the influence of fitness
scaling, the individuals from the current population are selected by deterministic
tournament selection with tournament size t s . Mutation is again dependent on
the chosen representation, and will be discussed later.
As two selected individuals can be of different length, standard uniform cross-
over cannot be applied. Instead different means have to be used: the aim is to
keep total number of classifiers constant, but as the location of the classifiers in
the genome of an individual do not provide any information, their location is al-
lowed to change. Thus, we proceed as shown in function Crossover by randomly
choosing the new number K a and K b of classifiers in each of the new individu-
als
M b such that the sum of classifiers K a + K b = K a + K b remains
unchanged, and each new individual has at least one classifier. The matching
functions of individual
M a and
M b
are determined by randomly picking K b
matching
M a received all
functions from either of the old individuals. The other individual
K b matching functions. In summary, crossover is per-
formed by collecting the matching functions of both individuals, and randomly
redistributing them.
the remaining K a + K b
 
Search WWH ::




Custom Search