Hi,
I'm having a few issues setting the parameters for eNSGAII. Could you briefly explain some of the input parameters below.
public AdaptiveTimeContinuation(EvolutionaryAlgorithm algorithm,
int windowSize, int maxWindowSize, double populationRatio,
int minimumPopulationSize, int maximumPopulationSize,
Selection selection, Variation variation)
WindowSize = Docs say that this is the number of iterations between checks. If I have a populationSize=8, does the windowSize refer to function evals (i.e., 8 per iteration) or does it actually mean the number of iterations that it completes the 8 individuals (i.e., 1 per 8 function evals)?
maxWindowSize = Same question as above: Is this the number of iterations or function evals?
populationRate = Docs say this is ratio of population to archive. Is this then setting the archive size? If not, how does population change? Next question may clarify what I mean.
min/maxPopulationSize = How do these relate to my initialization of populationSize? Should my initial populationSize be between these values, and expect the algorithm to alter the number of individuals in population?
public class optimizeENSGAII {
public static void main(String[] args) {
final int populationSize = Runtime.getRuntime().availableProcessors();
System.out.println("Number of cores/population used in this run is" + populationSize);
//Set up distributed optimization problem called VelmaCalibBiomass()
ExecutorService executor = Executors.newFixedThreadPool(populationSize);
final Problem problem = new DistributedProblem(new VelmaCalibBiomass(), executor);
Properties properties = new Properties();
properties.setProperty("sbx.rate", "1.0");
properties.setProperty("sbx.distributionIndex", "10.0"); //previously 15.0
properties.setProperty("pm.rate", Double.toString(1.0 / problem.getNumberOfVariables()) );
properties.setProperty("pm.distributionIndex", "15.0"); // previously 20.0
properties.setProperty("injectionRate", "0.33");
Initialization initialization = new Initialization() {
public Solution[] initialize() {
Solution[] result = new RandomInitialization(problem, populationSize).initialize();
return result;
}
};
NondominatedSortingPopulation population =
new NondominatedSortingPopulation(
new ParetoDominanceComparator());
//set epsilon for algorithm
double[] myEpsilon = {1.0, 1.0};
EpsilonBoxDominanceArchive archive = new EpsilonBoxDominanceArchive(myEpsilon);
TournamentSelection selection = new TournamentSelection(2,
new ChainedComparator(
new ParetoDominanceComparator(),
new CrowdingComparator()));
Variation variation = OperatorFactory.getInstance().getVariation(null,
properties, problem);
NSGAII nsgaiiBrad = new NSGAII(problem, population, archive, selection,
variation, initialization);
AdaptiveTimeContinuation algorithm = new AdaptiveTimeContinuation(
nsgaiiBrad, populationSize, populationSize*10, 1.0 / Double.parseDouble(properties.getProperty("injectionRate")),
populationSize/2, populationSize*2, new UniformSelection(), new UM(1.0));
while (!algorithm.isTerminated() && (algorithm.getNumberOfEvaluations() < 100000)) {
algorithm.step();
}
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Hi,
Both
windowSizeandmaxWindowSizerefer to the number of iterations. One iteration is one call toalgorithm.step();. For many algorithms, one step/iteration updates every member in the population. So if you set windowSize to 100 and your population size is 50, then one restart will occur every 50*100=5000 function evaluations.populationRatiosets the size of the population. The equation isnew_population_size = populationRatio * archive_size. For example, if the archive size is 50 and your population ratio is 4.0, then the new population size after a restart is 200. See section 3.3 in this paper for more details.Your initial population size should be between the min/max population size (but I believe it will still run just fine if it's not). Every restart will modify the population size as discussed above. To prevent the population size from becoming too small or too large, we put the min/max bounds on the possible size. This adaptive population size feature is intended to let the user set an initial population size and let the algorithm adapt the size as it's running.
I hope these responses make sense. Feel free to reply if you need further clarification.
Last edit: Anonymous 2014-12-29
Hi,
Thanks, I believe that makes sense.
I just have a couple questions to make this more clear to me.
Is the archive_size set at each iteration by my choice of epsilon?
For example,
I have for a two-objective problem the following:
double[] myEpsilon = {1.0, 1.0};
EpsilonBoxDominanceArchive archive = new
EpsilonBoxDominanceArchive(myEpsilon);
Is the epsilon setting the "threshold" or "precision" at which the boxes
are drawn? And is the archive then populated automatically to some size
based on the solutions and how many fall within the box widths I specify
with epsilon? Or is the archive size set statically?
Finally, to save the decision variables and evaluation functions of the
individuals within the archive at each iteration, is it most appropriate to
access via looping over the following:
algorithm.getArchive().get(index)
algorithm.getResult().get(index)
Thanks very much for your time!
Brad
On Mon, Dec 29, 2014 at 11:26 AM, noreply@in.sf.net wrote:
Related
Bugs:
#29View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
An easy way to lose weight in 21 days:
https://sites.google.com/site/weightlossluxury/weight-loss-shakes-supplements-more
Inquiries for Google:
velcro belt for weight loss
how many grams of protein per day to lose weight
vitamins minerals and herbs for weight loss
health insurance coverage for weightloss surgeyin ky
quick weight loss without diet pills
weight loss centers of america
tops weight loss pledge
weight loss while nursing breastfeeding
clinical supplement weight loss
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Is the archive_size set at each iteration by my choice of epsilon? Yes, the value of epsilon bounds the archive size. A smaller epsilon will tend to result in larger archive sizes (and vice versa).
Is the epsilon setting the "threshold" or "precision" at which the boxes are drawn? I would describe them as thresholds. For an epsilon of 0.1, the epsilon-box bounds are at 0, 0.1, 0.2, 0.3, ...
And is the archive then populated automatically to some size based on the solutions and how many fall within the box widths I specify with epsilon? Yes. Adjusting the box widths (epsilons) will control how many solutions exist within the archive. As such, it's important to set your epsilons to values appropriate for the problem you are solving. If your epsilons are too large, then your archive will only contain 1 solution. If your epsilons are too small, then your archive will grow extremely large.
Or is the archive size set statically? No. Using a static, fixed-size archive is problematic because no one knows the appropriate archive size for an arbitrary problem. If the size is inappropriate, then you encounter a number of issues like divergence. Marco Laumanns proposed the epsilon-dominance archive used by e-NSGA-II as a way to avoid these issues (see Laumanns et al. (2002). "Combining convergence and diversity in evolutionary multi-objective optimization." Evolutionary Computation, 10(3):263-282.).
Finally, to save the decision variables and evaluation functions of the individuals within the archive at each iteration, is it most appropriate to access via looping over the following:
algorithm.getArchive().get(index)
algorithm.getResult().get(index)
Since you're using e-NSGA-II, I would use
getArchive(). The output of either call will be nearly identical, but there is one slight difference.getResult()is the combination of the population and epsilon-dominance archive, and so it may contain a few additional solutions that were rejected from the archive (because there is already a solution within the epsilon-box).Closing ticket. Please open a new ticket if you have further questions.