Population-based incremental learning

In computer science and machine learning, population-based incremental learning (PBIL) is an optimization algorithm, and an estimation of distribution algorithm. This is a type of genetic algorithm where the genotype of an entire population (probability vector) is evolved rather than individual members.[1] The algorithm is proposed by Shumeet Baluja in 1994. The algorithm is simpler than a standard genetic algorithm, and in many cases leads to better results than a standard genetic algorithm.[2][3][4]

Algorithm

In PBIL, genes are represented as real values in the range [0,1], indicating the probability that any particular allele appears in that gene.

The PBIL algorithm is as follows:

  1. A population is generated from the probability vector.
  2. The fitness of each member is evaluated and ranked.
  3. Update population genotype (probability vector) based on fittest individual.
  4. Mutate.
  5. Repeat steps 1–4

Source code

This is a part of source code implemented in Java. In the paper, learnRate = 0.1, negLearnRate = 0.075, mutProb = 0.02, and mutShift = 0.05 is used. N = 100 and ITER_COUNT = 1000 is enough for a small problem.

public void optimize() {
    final int totalBits = getTotalBits();
    final double[] probVec = new double[totalBits];
    Arrays.fill(probVec, 0.5);
    bestCost = POSITIVE_INFINITY;
 
    for (int i = 0; i < ITER_COUNT; i++) {
        // Creates N genes
        final boolean[][] genes = new [N][totalBits];
        for (boolean[] gene : genes) {
            for (int k = 0; k < gene.length; k++) {
                if (rand_nextDouble() < probVec[k])
                    gene[k] = true;
            }
        }

        // Calculate costs
        final double[] costs = new double[N];
        for (int j = 0; j < N; j++) {
            costs[j] = costFunc.cost(toRealVec(genes[j], domains));
        }

        // Find min and max cost genes
        boolean[] minGene = null, maxGene = null;
        double minCost = POSITIVE_INFINITY, maxCost = NEGATIVE_INFINITY;
        for (int j = 0; j < N; j++) {
            double cost = costs[j];
            if (minCost > cost) {
                minCost = cost;
                minGene = genes[j];
            }
            if (maxCost < cost) {
                maxCost = cost;
                maxGene = genes[j];
            }
        }

        // Compare with the best cost gene
        if (bestCost > minCost) {
            bestCost = minCost;
            bestGene = minGene;
        }

        // Update the probability vector with max and min cost genes
        for (int j = 0; j < totalBits; j++) {
            if (minGene[j] == maxGene[j]) {
                probVec[j] = probVec[j] * (1d - learnRate) +
                        (minGene[j] ? 1d : 0d) * learnRate;
            } else {
                final double learnRate2 = learnRate + negLearnRate;
                probVec[j] = probVec[j] * (1d - learnRate2) +
                        (minGene[j] ? 1d : 0d) * learnRate2;
            }
        }

        // Mutation
        for (int j = 0; j < totalBits; j++) {
            if (rand.nextDouble() < mutProb) {
                probVec[j] = probVec[j] * (1d - mutShift) +
                        (rand.nextBoolean() ? 1d : 0d) * mutShift;
            }
        }
    }
}
gollark: The AST one sounds easier, do so.
gollark: ```osmarks@procyon ~> lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTmmcblk0 179:0 0 7.3G 0 disk ├─mmcblk0p1 179:1 0 2M 0 part ├─mmcblk0p2 179:2 0 2M 0 part ├─mmcblk0p3 179:3 0 1M 0 part ├─mmcblk0p4 179:4 0 1M 0 part ├─mmcblk0p5 179:5 0 1M 0 part ├─mmcblk0p6 179:6 0 1M 0 part ├─mmcblk0p7 179:7 0 4M 0 part ├─mmcblk0p8 179:8 0 8M 0 part ├─mmcblk0p9 179:9 0 8M 0 part ├─mmcblk0p10 179:10 0 4M 0 part ├─mmcblk0p11 179:11 0 1M 0 part ├─mmcblk0p12 179:12 0 1M 0 part ├─mmcblk0p13 179:13 0 1M 0 part ├─mmcblk0p14 179:14 0 1M 0 part ├─mmcblk0p15 179:15 0 1M 0 part ├─mmcblk0p16 179:16 0 2M 0 part ├─mmcblk0p17 179:17 0 20M 0 part ├─mmcblk0p18 179:18 0 5M 0 part ├─mmcblk0p19 179:19 0 1M 0 part ├─mmcblk0p20 179:20 0 16M 0 part ├─mmcblk0p21 179:21 0 16M 0 part ├─mmcblk0p22 179:22 0 200M 0 part ├─mmcblk0p23 179:23 0 1.5G 0 part │ ├─mmcblk0p23p1 254:0 0 94M 0 part /boot│ └─mmcblk0p23p2 254:1 0 1.4G 0 part /├─mmcblk0p24 179:24 0 150M 0 part ├─mmcblk0p25 179:25 0 9M 0 part └─mmcblk0p26 179:26 0 5.4G 0 part mmcblk0boot0 179:32 0 4M 1 disk mmcblk0boot1 179:64 0 4M 1 disk mmcblk0rpmb 179:96 0 4M 0 disk ```android_partition_scheme_irl
gollark: The GTech™ ones, with infinite processing power but somewhat limited memory.
gollark: Oh, I mostly use an infinitely powerful computer.
gollark: Yes, I assume it's wine badness.

See also

References

  1. Karray, Fakhreddine O.; de Silva, Clarence (2004), Soft computing and intelligent systems design, Addison Wesley, ISBN 0-321-11617-8
  2. Baluja, Shumeet (1994), "Population-Based Incremental Learning: A Method for Integrating Genetic Search Based Function Optimization and Competitive Learning", Technical Report, Pittsburgh, PA: Carnegie Mellon University (CMU–CS–94–163), CiteSeerX 10.1.1.61.8554
  3. Baluja, Shumeet; Caruana, Rich (1995), Removing the Genetics from the Standard Genetic Algorithm, Morgan Kaufmann Publishers, pp. 38–46, CiteSeerX 10.1.1.44.5424
  4. Baluja, Shumeet (1995), An Empirical Comparison of Seven Iterative and Evolutionary Function Optimization Heuristics, CiteSeerX 10.1.1.43.1108
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.