-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from jMetal/develop
Minor release 0.5.1
- Loading branch information
Showing
55 changed files
with
1,054 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
Examples | ||
============== | ||
Getting started | ||
================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Algorithms: | ||
|
||
runner/nsgaii | ||
runner/smpso | ||
examples/nsgaii | ||
examples/smpso | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Further configuration: | ||
|
||
runner/observer | ||
examples/observer | ||
examples/experiment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Experiments | ||
======================== | ||
|
||
This is an example of an experimental study based on solving two problems of the ZDT family with two versions of the same algorithm (NSGAII). | ||
The hypervolume indicator is used for performance assessment. | ||
|
||
.. code-block:: python | ||
# Configure experiment | ||
problem_list = [ZDT1(), ZDT2()] | ||
algorithm_list = [] | ||
for problem in problem_list: | ||
algorithm_list.append( | ||
('NSGAII_A', | ||
NSGAII( | ||
problem=problem, | ||
population_size=100, | ||
max_evaluations=25000, | ||
mutation=NullMutation(), | ||
crossover=SBX(probability=1.0, distribution_index=20), | ||
selection=BinaryTournamentSelection(comparator=RankingAndCrowdingDistanceComparator()) | ||
)) | ||
) | ||
algorithm_list.append( | ||
('NSGAII_B', | ||
NSGAII( | ||
problem=problem, | ||
population_size=100, | ||
max_evaluations=25000, | ||
mutation=Polynomial(probability=1.0 / problem.number_of_variables, distribution_index=20), | ||
crossover=SBX(probability=1.0, distribution_index=20), | ||
selection=BinaryTournamentSelection(comparator=RankingAndCrowdingDistanceComparator()) | ||
)) | ||
) | ||
study = Experiment(algorithm_list, n_runs=2) | ||
study.run() | ||
# Compute quality indicators | ||
metric_list = [HyperVolume(reference_point=[1, 1])] | ||
print(study.compute_metrics(metric_list)) |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from jmetal.algorithm import NSGAII | ||
from jmetal.component.comparator import RankingAndCrowdingDistanceComparator | ||
from jmetal.operator import NullMutation, SBX, BinaryTournamentSelection, Polynomial | ||
from jmetal.problem import ZDT1, ZDT2 | ||
from jmetal.component.quality_indicator import HyperVolume | ||
from jmetal.util.laboratory import Experiment | ||
|
||
# Configure experiment | ||
problem_list = [ZDT1(), ZDT2()] | ||
algorithm_list = [] | ||
|
||
for problem in problem_list: | ||
algorithm_list.append( | ||
('NSGAII_A', | ||
NSGAII( | ||
problem=problem, | ||
population_size=100, | ||
max_evaluations=25000, | ||
mutation=NullMutation(), | ||
crossover=SBX(probability=1.0, distribution_index=20), | ||
selection=BinaryTournamentSelection(comparator=RankingAndCrowdingDistanceComparator()) | ||
)) | ||
) | ||
algorithm_list.append( | ||
('NSGAII_B', | ||
NSGAII( | ||
problem=problem, | ||
population_size=100, | ||
max_evaluations=25000, | ||
mutation=Polynomial(probability=1.0 / problem.number_of_variables, distribution_index=20), | ||
crossover=SBX(probability=1.0, distribution_index=20), | ||
selection=BinaryTournamentSelection(comparator=RankingAndCrowdingDistanceComparator()) | ||
)) | ||
) | ||
|
||
study = Experiment(algorithm_list, n_runs=2) | ||
study.run() | ||
|
||
# Compute quality indicators | ||
metric_list = [HyperVolume(reference_point=[1, 1])] | ||
|
||
print(study.compute_metrics(metric_list)) |
Oops, something went wrong.