Questions tagged [deap]

DEAP is an evolutionary computation framework for rapid prototyping and testing of ideas

DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas. It seeks to make algorithms explicit and data structures transparent. It works in perfect harmony with parallelisation mechanism such as multiprocessing and SCOOP.

Features:

  • Genetic algorithm using any imaginable representation
  • List, Array, Set, Dictionary, Tree, Numpy Array, etc.
  • Genetic programing using prefix trees
  • Loosely typed, Strongly typed
  • Automatically defined functions
  • Evolution strategies (including CMA-ES)
  • Multi-objective optimisation (NSGA-II, SPEA-II)
  • Co-evolution (cooperative and competitive) of multiple populations
  • Parallelization of the evaluations (and more)
  • Hall of Fame of the best individuals that lived in the population
  • Checkpoints that take snapshots of a system regularly
  • Benchmarks module containing most common test functions
  • Genealogy of an evolution (that is compatible with NetworkX)
  • Examples of alternative algorithms: Particle Swarm Optimization, Differential Evolution, - Estimation of Distribution Algorithm
173 questions
0
votes
1 answer

Why is deap multiprocessing method not faster?

I am using the DEAP framework to run a genetic algorithm and I am trying to speed it up using the multiprocessing module from deap : import multiprocessing pool = multiprocessing.Pool() toolbox.register("map", pool.map) I tried running it both…
0
votes
1 answer

Error using DEAP 1.3: mutPolynomialBounded()

In run in an error of mutPolynomialBounded in my optimization. my code: print('MinVals',MinVals) print('MaxVals',MaxVals) toolbox.register("mate" , tools.cxSimulatedBinaryBounded, low=MinVals, up=MaxVals,eta=20.) toolbox.register("mutate",…
user3884301
0
votes
1 answer

register multiple parameters to an individual using DEAP

I have to integrate DEAP into a bigger frame work. For testing I defined: from deap import base from deap import creator from deap import tools from collections import * import random NAME = 0 TYPE = 1 INITIAL = 2 MIN = 3 MAX = 4 CATEGORY =…
user3884301
0
votes
1 answer

bounds violated in genetic algorithm using DEAP

I am new using DEAP. My task is to optimize a technical system, which needs parameters as int and float values in a specific range. As a first step I wrote a small script based on the DEAP documentation. import random from deap import base from…
user3884301
0
votes
1 answer

how to get a knee point solution from pareto front

I am using a python package DEAP to run NSGA_II algorithm for multi-objective optimization. The out put a a set of pareto optimal solutions in (objective space and parameter space). My question is: How can I code a simple python code to get the knee…
Dr. Zezo
  • 395
  • 2
  • 17
0
votes
1 answer

Going from non-linear root-finding to multi-objective optimization

To simplify, let's say I can describe a system with variables x1 and x2, parameters p1 and p2, and constraints f(x, p) = 0 and g(x, p) = 0: For example: f(x1, x2, p1, p2) = x1^2 * p1 + x1^2 * p2 + x2 = 0 g(x1, x2, p1, p2) = x2^2 * p2 + x1 * p1 =…
Florent H
  • 323
  • 1
  • 8
0
votes
0 answers

Deap run time is giving error of key Error

C:\Python27\python.exe C:/Users/Adekunle/PycharmProjects/d4jtest/newDp.py Traceback (most recent call last): File "C:/Users/Adekunle/PycharmProjects/d4jtest/newDp.py", line 166, in main_run("C:\defect4j\TinyGP") File…
0
votes
1 answer

Python DEAP - Getting the Pareto Front for every generation

I am using DEAP to run a multi objective optimization using eaSimple. The code returns the ParetoFront() after the last generation. Is there any way to get a set of ParetoFront() for each generation? I would like to see the evolution of the fronts…
0
votes
1 answer

Implementing a clearing procedure in DEAP

A clearing procedure (Petrowski 96) is a niching method to solve multimodal problems. Is there a way of using a clearing procedure with DEAP? For other niching methods such as sharing, only the fitness function needs to be modified. These methods…
usernumber
  • 1,958
  • 1
  • 21
  • 58
0
votes
0 answers

how to write customized function that apply to dataframe columns as primitives for DEAP

I am using DEAP to do symbolic regression. I'm wondering how to write a function that calculate covariance of two columns in python DataFrame of train data as primitives for symbolic regression? The examples are all applying functions to rows of…
stentor
  • 1
  • 1
0
votes
1 answer

How to make individuals be a list of variable length in DEAP

I was looking at the Knapsack example, and I would like to transpose it to the case where individuals are represented by lists rather than by sets. If I run this snippet from deap import creator, base, tools import random creator.create("Fitness",…
usernumber
  • 1,958
  • 1
  • 21
  • 58
0
votes
1 answer

using deap for coding tsp problem issues with evaluation function

I was following a solution that I found on a book called Deap by Example in which the author solved the TSP by using GA with the Deap library, so far my code is the following: import sys import array import random import numpy as np import…
Little
  • 3,363
  • 10
  • 45
  • 74
0
votes
1 answer

DEAP eaSimple algorithm with odd number of individuals

The documentation for the eaSimple algorithm states that parents are divided into pairs of consecutive individuals, and each pair generates two offspring. First, the parental population Pp is duplicated using the toolbox.clone() method and the…
usernumber
  • 1,958
  • 1
  • 21
  • 58
0
votes
1 answer

Separate mutation probabilities for each part of the solution (Genetic Algorithms)

I am working with the Deap library (Python) for evolutionary computation. I am interested in the following mutation function: deap.tools.mutGaussian(individual, mu, sigma, indpb) where indpb, according to documentation, refers to the probability of…
sdgaw erzswer
  • 2,182
  • 2
  • 26
  • 45
0
votes
1 answer

Number of selected individuals for eaSimple algorithm from DEAP with selBest selection

I am trying to run the eaSimple algorithm from the DEAP module. I would like to specify the number of individuals to be selected at each generation. However, if I specify a k parameter for the selection function, I get an error. from deap import…
usernumber
  • 1,958
  • 1
  • 21
  • 58