|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.algorithm.outlier.AggarwalYuEvolutionary.EvolutionarySearch
private class AggarwalYuEvolutionary.EvolutionarySearch
The inner class to handle the actual evolutionary computation.
Field Summary | |
---|---|
(package private) int |
dbsize
Database size |
(package private) int |
dim
Database dimensionality |
(package private) int |
m
m to use. |
private Random |
random
random generator |
(package private) ArrayList<ArrayList<DBIDs>> |
ranges
Database ranges |
Constructor Summary | |
---|---|
AggarwalYuEvolutionary.EvolutionarySearch(Relation<V> database,
ArrayList<ArrayList<DBIDs>> ranges,
int m,
Long seed)
Constructor. |
Method Summary | |
---|---|
private boolean |
checkConvergence(Collection<AggarwalYuEvolutionary.Individuum> pop)
check the termination criterion |
private AggarwalYuEvolutionary.Individuum |
combineRecursive(ArrayList<Integer> r,
int i,
int[] current,
AggarwalYuEvolutionary.Individuum parent1,
AggarwalYuEvolutionary.Individuum parent2)
Recursive method to build all possible gene combinations using positions in r. |
private ArrayList<AggarwalYuEvolutionary.Individuum> |
crossoverOptimized(ArrayList<AggarwalYuEvolutionary.Individuum> population)
method implements the crossover algorithm |
private ArrayList<AggarwalYuEvolutionary.Individuum> |
initialPopulation(int popsize)
Produce an initial (random) population. |
private AggarwalYuEvolutionary.Individuum |
makeIndividuum(int[] gene)
Make a new individuum helper, computing sparsity=fitness |
private ArrayList<AggarwalYuEvolutionary.Individuum> |
mutation(ArrayList<AggarwalYuEvolutionary.Individuum> population,
double perc1,
double perc2)
method implements the mutation algorithm |
private Pair<AggarwalYuEvolutionary.Individuum,AggarwalYuEvolutionary.Individuum> |
recombineOptimized(AggarwalYuEvolutionary.Individuum parent1,
AggarwalYuEvolutionary.Individuum parent2)
Recombination method. |
private ArrayList<AggarwalYuEvolutionary.Individuum> |
rouletteRankSelection(ArrayList<AggarwalYuEvolutionary.Individuum> population)
the selection criterion for the genetic algorithm: roulette wheel mechanism: where the probability of sampling an individual of the population was proportional to p - r(i), where p is the size of population and r(i) the rank of i-th individual |
Collection<AggarwalYuEvolutionary.Individuum> |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final int dbsize
final int dim
final ArrayList<ArrayList<DBIDs>> ranges
final int m
private final Random random
Constructor Detail |
---|
public AggarwalYuEvolutionary.EvolutionarySearch(Relation<V> database, ArrayList<ArrayList<DBIDs>> ranges, int m, Long seed)
database
- Database to usem
- Population sizeseed
- Random generator seedMethod Detail |
---|
public Collection<AggarwalYuEvolutionary.Individuum> run()
private boolean checkConvergence(Collection<AggarwalYuEvolutionary.Individuum> pop)
private ArrayList<AggarwalYuEvolutionary.Individuum> initialPopulation(int popsize)
popsize
- Population size
private ArrayList<AggarwalYuEvolutionary.Individuum> rouletteRankSelection(ArrayList<AggarwalYuEvolutionary.Individuum> population)
population
- private ArrayList<AggarwalYuEvolutionary.Individuum> mutation(ArrayList<AggarwalYuEvolutionary.Individuum> population, double perc1, double perc2)
private AggarwalYuEvolutionary.Individuum makeIndividuum(int[] gene)
gene
- Gene to evaluate
private ArrayList<AggarwalYuEvolutionary.Individuum> crossoverOptimized(ArrayList<AggarwalYuEvolutionary.Individuum> population)
private Pair<AggarwalYuEvolutionary.Individuum,AggarwalYuEvolutionary.Individuum> recombineOptimized(AggarwalYuEvolutionary.Individuum parent1, AggarwalYuEvolutionary.Individuum parent2)
parent1
- First parentparent2
- Second parent
private AggarwalYuEvolutionary.Individuum combineRecursive(ArrayList<Integer> r, int i, int[] current, AggarwalYuEvolutionary.Individuum parent1, AggarwalYuEvolutionary.Individuum parent2)
r
- valid positions to usei
- Offset in r to start at.current
- Current geneparent1
- First parentparent2
- Second parent
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |