private class AggarwalYuEvolutionary.EvolutionarySearch
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
dbsize
Database size.
|
(package private) int |
dim
Database dimensionality.
|
(package private) int |
m
m to use.
|
private java.util.Random |
random
random generator.
|
(package private) java.util.ArrayList<java.util.ArrayList<DBIDs>> |
ranges
Database ranges.
|
Constructor and Description |
---|
EvolutionarySearch(Relation<V> relation,
java.util.ArrayList<java.util.ArrayList<DBIDs>> ranges,
int m,
java.util.Random random)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
checkConvergence(java.util.Collection<AggarwalYuEvolutionary.Individuum> pop)
check the termination criterion.
|
private AggarwalYuEvolutionary.Individuum |
combineRecursive(it.unimi.dsi.fastutil.ints.IntArrayList r,
int i,
short[] current,
AggarwalYuEvolutionary.Individuum parent1,
AggarwalYuEvolutionary.Individuum parent2)
Recursive method to build all possible gene combinations using positions
in r.
|
private java.util.ArrayList<AggarwalYuEvolutionary.Individuum> |
crossoverOptimized(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population)
method implements the crossover algorithm
|
private java.util.ArrayList<AggarwalYuEvolutionary.Individuum> |
initialPopulation(int popsize)
Produce an initial (random) population.
|
private AggarwalYuEvolutionary.Individuum |
makeIndividuum(short[] gene)
Make a new individuum helper, computing sparsity=fitness
|
private java.util.ArrayList<AggarwalYuEvolutionary.Individuum> |
mutation(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population,
double perc1,
double perc2)
Apply the mutation algorithm.
|
private Pair<AggarwalYuEvolutionary.Individuum,AggarwalYuEvolutionary.Individuum> |
recombineOptimized(AggarwalYuEvolutionary.Individuum parent1,
AggarwalYuEvolutionary.Individuum parent2)
Recombination method.
|
private java.util.ArrayList<AggarwalYuEvolutionary.Individuum> |
rouletteRankSelection(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population)
Select surviving individuums weighted by rank.
|
Heap.UnorderedIter |
run() |
final int dbsize
final int dim
final java.util.ArrayList<java.util.ArrayList<DBIDs>> ranges
final int m
private final java.util.Random random
public Heap.UnorderedIter run()
private boolean checkConvergence(java.util.Collection<AggarwalYuEvolutionary.Individuum> pop)
pop
- Populationprivate java.util.ArrayList<AggarwalYuEvolutionary.Individuum> initialPopulation(int popsize)
popsize
- Population sizeprivate java.util.ArrayList<AggarwalYuEvolutionary.Individuum> rouletteRankSelection(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population)
population
- Populationprivate java.util.ArrayList<AggarwalYuEvolutionary.Individuum> mutation(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population, double perc1, double perc2)
private AggarwalYuEvolutionary.Individuum makeIndividuum(short[] gene)
gene
- Gene to evaluateprivate java.util.ArrayList<AggarwalYuEvolutionary.Individuum> crossoverOptimized(java.util.ArrayList<AggarwalYuEvolutionary.Individuum> population)
private Pair<AggarwalYuEvolutionary.Individuum,AggarwalYuEvolutionary.Individuum> recombineOptimized(AggarwalYuEvolutionary.Individuum parent1, AggarwalYuEvolutionary.Individuum parent2)
parent1
- First parentparent2
- Second parentprivate AggarwalYuEvolutionary.Individuum combineRecursive(it.unimi.dsi.fastutil.ints.IntArrayList r, int i, short[] current, AggarwalYuEvolutionary.Individuum parent1, AggarwalYuEvolutionary.Individuum parent2)
r
- valid positions to usei
- Offset in r to start at.current
- Current geneparent1
- First parentparent2
- Second parentCopyright © 2019 ELKI Development Team. License information.