Skip to content

Commit

Permalink
minor doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MangaBoba committed Dec 21, 2023
1 parent 4f1bae2 commit bac6bd5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/source/gefest/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Let's take a step-by-step look at how to do this.
from gefest.core.opt.objective.objective import Objective
from gefest.tools.estimators.estimator import Estimator
- **Step 1**. Define objectives using loss function and simulator of the physical process if required.
- **Step 1**. Define objectives using fitness function and simulator of the physical process if required.

Objective for finding a polygon that seems like circle showed below.

Expand Down Expand Up @@ -127,7 +127,7 @@ Domain describes geometric constraints for individuals.

By default, the standard sampler is used.
You can select another sampler or define custom for spicific task.
How to define your own samler described in the tutorials section of the documentation.
How to define your own sampler described in the tutorials section of the documentation.

- **Step 4**. Define tuner configuraton.

Expand Down Expand Up @@ -197,7 +197,7 @@ To know more about configuration options see :ref:`configuration` section of API
- **Step 5**. Run generative design and results visualisation.

Now you can run the optimization as it was described above in *How to run* section of this tutorial.
Let's look at how it works inside.
Let's take a look at code in `run_experiments.py` script.

.. code:: python
Expand All @@ -221,7 +221,7 @@ Let's look at how it works inside.
# Optimized pop visualization
logger.info('Collecting plots of optimized structures...')
# GIFMaker object creates mp4 series of optimized structures plots
# GIFMaker object creates mp4 from optimized structures plots
gm = GIFMaker(domain=opt_params.domain)
for st in tqdm(optimized_pop):
gm.create_frame(st, {'Optimized': st.fitness})
Expand Down
10 changes: 5 additions & 5 deletions docs/source/tutorials/optimisation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Optimisation
Optimisers summary
------------------

To solve the optimisation problem, 4 optimisers are available in GEFEST - 1 native and 2 based on GOLEM.
To solve the optimisation problems 4 optimisers are available in GEFEST - 1 native and 2 based on GOLEM.
All of them have a single interface and can be imported from ``gefest.tools.optimizers``.

.. list-table:: Optimizers comparation
Expand Down Expand Up @@ -39,13 +39,13 @@ All of them have a single interface and can be imported from ``gefest.tools.opti
- :raw-html-m2r:`<code style="background:green;color:white;font-weight:bold">Yes</code>`


``BaseGA`` implements the base genetic algorithm, that performs generation of the initial population,
``BaseGA`` implements the base genetic algorithm, that performs sampling of the initial population,
crossover and mutation operations, fitness estimation and selection.
Each of the steps is encapsulated in a separate executor, which allows you to change the logic of individual steps.
Thus, BaseGA essentially only implements the sequence of their call.

``StandardOptimizer`` is a wrapper for GOLEM`s ``EvoGraphOptimizer`` optimiser.
It allows to select different evolutionary schemes, adaptive mutation strategies and some other features.
``StandardOptimizer`` is a wrapper for GOLEM`s ``EvoGraphOptimizer``.
It allows to use different evolutionary schemes, adaptive mutation strategies and some other features.
To use multiobjective optimisation set `golem_selection_type` in ``OptimizationParams`` config to 'spea2'.

``SurrogateOptimizer`` is the extension of ``StandardOptimizer`` with the ability
Expand All @@ -64,7 +64,7 @@ How to optimise

Easiest way to run optimiser described in :ref:`quickstart`.

If you want to get some more control you can do it in code by import corresponding classes:
If you want to get some more control you can do it in your code:

.. code-block:: python
Expand Down
3 changes: 2 additions & 1 deletion docs/source/tutorials/tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ Here we will take a closer look at several ``TunerParams`` attributes which may

*
``hyperopt_dist`` is the type of distribution from which random values will be taken during tuning. Available values are names of `hpyeropt hp module finctions <https://github.com/hyperopt/hyperopt/blob/master/hyperopt/hp.py>`_.
**Note**: in GOLEM 0.4.0 part of tuners does not converts bounds into mu and sigma. Use 'uniform' to avoid invalid intervals.

*
``variance_generator`` is function that generates bounds of intervals from which random values should pe picked for all components of all point in structure. If normal distribution set they will be automatically converted into means and varicances.

``verage_edge_variance`` function setes variance to 50% of average edge length for each polygon. This solution can be much more "greedy" than necessary, which can lead to many invalid intermediate variants during tuning. To improve fitness in fewer tuning steps, it is worth creating variance generation functions for selecting smaller intervals based on the conditions of a specific task.
``percent_edge_variance`` function setes variance to spicific percent of average edge length for each polygon. This solution can be much more "greedy" than necessary, which can lead to many invalid intermediate variants during tuning. To improve fitness in fewer tuning steps, it is worth creating variance generation functions for selecting smaller intervals based on the conditions of a specific task.

Now that the ``OptimizationParams`` have been defined and some structures have been created, we can run tuning with couple lines of code:

Expand Down

0 comments on commit bac6bd5

Please sign in to comment.