-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,7 @@ celerybeat.pid | |
# Environments | ||
.env | ||
.venv | ||
.venv* | ||
env/ | ||
venv/ | ||
ENV/ | ||
|
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ Tutorials | |
|
||
optimisation | ||
tuning | ||
sa |
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,39 @@ | ||
Sensitivity analysis | ||
==================== | ||
|
||
SA | ||
-- | ||
|
||
Use SA to run local search near an optimized structure. | ||
|
||
|
||
.. code-block:: python | ||
from gefest.core.configs.optimization_params import OptimizationParams | ||
from gefest.core.geometry.datastructs.structure import Structure | ||
from gefest.tools.tuners.sa import SensitivityAnalysis, report_viz | ||
from matplotlib import pyplot as plt | ||
structure: list[Structure] | Structure = ... | ||
opt_params: OptimizationParams = ... | ||
sa = SensitivityAnalysis([optimized_struct], opt_params) | ||
res = sa.analysis() | ||
# plot analysis history | ||
report_viz(res) | ||
# plot initial and best structure | ||
sv = StructVizualizer() | ||
sv.plot_structure(res[1][0]) | ||
sv.plot_structure(res[1][1]) | ||
plt.show(block=True) | ||
# animated history of structures during SA | ||
gm = GIFMaker() | ||
for st in tqdm(res[1]): | ||
gm.create_frame(st, {'sa': st.fitness}) | ||
gm.make_gif('sa individuals', 500) |