-
Notifications
You must be signed in to change notification settings - Fork 29
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
1 parent
ef25ae6
commit 7b4d1b5
Showing
33 changed files
with
787 additions
and
23 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 |
---|---|---|
|
@@ -19,6 +19,7 @@ extend-exclude = | |
tests | ||
.git | ||
studies | ||
examples | ||
|
||
# <<< UPDATE ACCORDING WITH YOUR PYTHON PROJECT | ||
|
||
|
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
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
:orphan: | ||
|
||
.. _sphx_glr_sg_execution_times: | ||
|
||
|
||
Computation times | ||
================= | ||
**00:01.116** total execution time for 6 files **from all galleries**: | ||
|
||
.. container:: | ||
|
||
.. raw:: html | ||
|
||
<style scoped> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" /> | ||
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" /> | ||
</style> | ||
<script src="https://code.jquery.com/jquery-3.7.0.js"></script> | ||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script> | ||
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script> | ||
<script type="text/javascript" class="init"> | ||
$(document).ready( function () { | ||
$('table.sg-datatable').DataTable({order: [[1, 'desc']]}); | ||
} ); | ||
</script> | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
:class: table table-striped sg-datatable | ||
|
||
* - Example | ||
- Time | ||
- Mem (MB) | ||
* - :ref:`sphx_glr_auto_examples_hydra_plot_hydra_usage.py` (``../../examples/hydra/plot_hydra_usage.py``) | ||
- 00:00.873 | ||
- 0.0 | ||
* - :ref:`sphx_glr_auto_examples_domain_plot_builtin_sampler.py` (``../../examples/domain/plot_builtin_sampler.py``) | ||
- 00:00.171 | ||
- 0.0 | ||
* - :ref:`sphx_glr_auto_examples_experimentdata_plot_experimentdata.py` (``../../examples/experimentdata/plot_experimentdata.py``) | ||
- 00:00.032 | ||
- 0.0 | ||
* - :ref:`sphx_glr_auto_examples_domain_plot_own_sampler.py` (``../../examples/domain/plot_own_sampler.py``) | ||
- 00:00.021 | ||
- 0.0 | ||
* - :ref:`sphx_glr_auto_examples_experimentdata_plot_experimentdata_storing.py` (``../../examples/experimentdata/plot_experimentdata_storing.py``) | ||
- 00:00.015 | ||
- 0.0 | ||
* - :ref:`sphx_glr_auto_examples_domain_plot_domain_creation.py` (``../../examples/domain/plot_domain_creation.py``) | ||
- 00:00.004 | ||
- 0.0 |
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,4 @@ | ||
This is my gallery | ||
================== | ||
|
||
Below is a gallery of examples |
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,4 @@ | ||
Domain | ||
------ | ||
|
||
Below is a gallery of examples |
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,51 @@ | ||
""" | ||
Use the built-in sampling strategies | ||
==================================== | ||
In this example, we will use the built-in sampling strategies provided by :mod:`f3dasm` to generate samples for a data-driven experiment. | ||
""" | ||
|
||
from matplotlib import pyplot as plt | ||
|
||
from f3dasm import ExperimentData | ||
from f3dasm.design import make_nd_continuous_domain | ||
|
||
############################################################################### | ||
# We create 2D continuous input domain with the :func:`~f3dasm.design.make_nd_continuous_domain` helper function: | ||
|
||
domain = make_nd_continuous_domain(bounds=[[0., 1.], [0., 1.]]) | ||
print(domain) | ||
|
||
############################################################################### | ||
# You can create an :class:`~f3dasm.ExperimentData` object with the :meth:`~f3dasm.ExperimentData.from_sampling` constructor directly: | ||
|
||
data_random = ExperimentData.from_sampling( | ||
domain=domain, n_samples=10, sampler='random', seed=42) | ||
|
||
fig, ax = plt.subplots(figsize=(4, 4)) | ||
|
||
print(data_random) | ||
|
||
df_random, _ = data_random.to_pandas() | ||
ax.scatter(df_random.iloc[:, 0], df_random.iloc[:, 1]) | ||
ax.set_xlabel(domain.names[0]) | ||
ax.set_ylabel(domain.names[1]) | ||
|
||
############################################################################### | ||
# :mod:`f3dasm` provides several built-in samplers. | ||
# The example below shows how to use the Latin Hypercube Sampling (LHS) sampler: | ||
|
||
data_lhs = ExperimentData.from_sampling( | ||
domain=domain, n_samples=10, sampler='latin', seed=42) | ||
|
||
fig, ax = plt.subplots(figsize=(4, 4)) | ||
|
||
print(data_lhs) | ||
|
||
df_lhs, _ = data_lhs.to_pandas() | ||
ax.scatter(df_lhs.iloc[:, 0], df_lhs.iloc[:, 1]) | ||
ax.set_xlabel(domain.names[0]) | ||
ax.set_ylabel(domain.names[1]) | ||
|
||
############################################################################### | ||
# More information all the available samplers can be found in :ref:`here <implemented samplers>`. |
Oops, something went wrong.