Industrial Applications of Genetic Algorithms:Data Mining Using Genetic Algorithms

Previous | Table of Contents | Next

Synthetic Data Sets and Data Set Generation

Since the focus of this chapter is on the development and verification of a genetic algorithm-based data mining search approach, an actual database with “real” data was not used nor was it required to demonstrate the usefulness of the genetic algorithm. Instead, “synthetic” data sets were generated to demonstrate the application of the genetic algorithm. As described earlier, a synthetically generated data set consists of X transactions. Each transaction consists of a transaction number (Trans_Num), the number of items purchased in the transaction (N), and a list of N items, where each item is specified by a number (i.e. 0=Pretzels, 1=Aspirin, 2=Beer, 3=Bread, etc.). Also, N can be any of 100 different items. The format of a transaction and an example of a transaction containing fifteen items are shown below:

Transaction Format: | Trans_Num N Item0 Item1 … ItemN
Example Transaction: | 0 15 1 2 3 10 19 55 42 41 22 83 20 20 87 92 6

Synthetic data sets were generated using a C program that allowed the user, through command line input, to specify data characteristics. Allowing the user control over data set characteristics facilitated verification of the genetic algorithm search results, since known relationships were embedded within the data sets. Then, the relationships that were discovered by the genetic search were confirmed against the expected results.

The synthetic data generator program required the user to provide at least one option to specify the number of transactions to generate. Other options allowed the user to specify individual items and the probability with which each of the specified items appeared within the synthetically generated data set.

GENETIC ALGORITHM SPECIFICS

The coding scheme, fitness function, and each of the three genetic operators (reproduction, crossover, and mutation) can be implemented in a variety of ways depending on the problem to which a genetic algorithm is being applied. Various implementation alternatives of these for the data mining problem examined in this chapter are discussed below.

Parameter Coding

A main difference between genetic algorithms and more traditional optimization and search algorithms is that genetic algorithms work with a coding of the parameter set and not the parameters themselves. Thus, before any type of genetic search can be performed, a coding scheme must be determined to represent the parameters in the problem at hand. In the data mining problem addressed by this chapter, the parameters of interest are simply four, potentially related, item numbers. Therefore, a coding scheme for four item numbers was determined considering the following factors:

  • A multi-parameter coding, consisting of four sub-strings, is required to code each of the four items into a single string.
  • Each sub-string needs to represent one of a hundred (0 through 99) possible items.
  • There are 100 choose 4 (3,921,225) possible combinations of items that need to be represented.

Given these factors, several coding schemes were considered. First, a scheme using a base-10 coded sub-string was examined. This coding allows 100 items to be represented, and no codings correspond to non-existent items (all possible sub-string codings would represent valid item numbers, 0 through 99). This coding results in an 8-digit string where each digit (dx) is between 0 and 9, as follows:

A coding of this sort, however, limits the number of schemata that are available for the genetic algorithm to exploit. Therefore, since we want to maximize the number of schemata, a binary coding, as shown below was considered.

Here, each digit (bx) is a 1 or 0. One problem with this coding is that, in order to represent 100 items, a sub-string must consist of seven bits (27 = 128). This means that 284 (128-100=28 values in each sub-string), or 614,656 strings could be manipulated by the genetic algorithm which don’t correspond to actual solutions.

Another possibility, when considering the fact that there are 3,921,225 combinations of items that need to be represented, was to code the items as a 22-bit binary string. This corresponds to 222, or 4,194,304 possible solution representations, reducing the number of non-solution strings to 273,079 (4,194,304-3,921,225). Using this approach, however, requires a mapping from a “combination number” to the actual four items represented by that combination since the item numbers are not specifically embedded within the string. If this combination-mapping approach was used, it would be difficult for the genetic algorithm to exploit similarities between strings since two combination numbers would not necessarily have anything in common, even if the items represented by the combination numbers were similar. Therefore, this coding approach was deemed unacceptable.

Given these possibilities, and considering the implementation of the crossover operator which is discussed in the section, “Reproduction, Crossover, and Mutation Operators,” the decimal coding appeared to be the best alternative and was therefore implemented for the data mining problem.

Previous | Table of Contents | Next

Copyright © CRC Press LLC