|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.math.optimization.ec.pso.PSOOptimization
public abstract class PSOOptimization
This class performs the optimization of a value vector with a particle swarm approach.
| Constructor Summary | |
|---|---|
PSOOptimization(int popSize,
int individualSize,
int maxGen,
int maxWithoutImprovement,
double inertiaWeight,
double localWeight,
double globalWeight,
double minValue,
double maxValue,
boolean dynamicInertiaWeight,
RandomGenerator random)
Creates a new PSO optimization with the given parameters. |
|
| Method Summary | |
|---|---|
protected Population |
createInitialPopulation(int popSize,
int individualSize)
Creates the initial population. |
abstract PerformanceVector |
evaluateIndividual(double[] individual)
Subclasses must implement this method to calculate the fitness of the given individual. |
double |
getBestFitnessEver()
Returns the best fitness ever. |
double |
getBestFitnessInGeneration()
Returns the best fitness in the current generation. |
PerformanceVector |
getBestPerformanceEver()
Returns the best performance vector ever. |
double[] |
getBestValuesEver()
Returns the best values ever. |
int |
getGeneration()
Returns the current generation. |
void |
nextIteration()
This method is invoked after each evaluation. |
void |
optimize()
Invoke this method for optimization. |
void |
reinit(int popSize,
int individualSize,
int maxGen,
int maxWithoutImprovement,
double inertiaWeight,
double localWeight,
double globalWeight,
double minValue,
double maxValue,
boolean dynamicInertiaWeight,
RandomGenerator random)
|
void |
setMaxValue(double maxValue)
|
void |
setMinValue(double minValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PSOOptimization(int popSize,
int individualSize,
int maxGen,
int maxWithoutImprovement,
double inertiaWeight,
double localWeight,
double globalWeight,
double minValue,
double maxValue,
boolean dynamicInertiaWeight,
RandomGenerator random)
| Method Detail |
|---|
public abstract PerformanceVector evaluateIndividual(double[] individual)
throws OperatorException
OperatorException
public void nextIteration()
throws OperatorException
OperatorExceptionpublic void setMinValue(double minValue)
public void setMaxValue(double maxValue)
protected Population createInitialPopulation(int popSize,
int individualSize)
public void reinit(int popSize,
int individualSize,
int maxGen,
int maxWithoutImprovement,
double inertiaWeight,
double localWeight,
double globalWeight,
double minValue,
double maxValue,
boolean dynamicInertiaWeight,
RandomGenerator random)
public void optimize()
throws OperatorException
optimize in interface OptimizationOperatorExceptionpublic int getGeneration()
getGeneration in interface Optimizationpublic double getBestFitnessInGeneration()
getBestFitnessInGeneration in interface Optimizationpublic double getBestFitnessEver()
getBestFitnessEver in interface Optimizationpublic PerformanceVector getBestPerformanceEver()
getBestPerformanceEver in interface Optimizationpublic double[] getBestValuesEver()
getBestValuesEver in interface Optimization
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||