.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/api/plot_doe.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_api_plot_doe.py: DOE algorithms ============== In this example, we will discover the different functions of the API related to design of experiments. .. GENERATED FROM PYTHON SOURCE LINES 31-42 .. code-block:: default from __future__ import division, unicode_literals from gemseo.api import ( configure_logger, get_algorithm_options_schema, get_available_doe_algorithms, ) configure_logger() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 43-48 Get available DOE algorithms ---------------------------- The :meth:`~gemseo.api.get_available_doe_algorithms` function returns the list of optimization algorithms available in |g| or in external modules .. GENERATED FROM PYTHON SOURCE LINES 48-50 .. code-block:: default print(get_available_doe_algorithms()) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ['CustomDOE', 'DiagonalDOE', 'OT_SOBOL', 'OT_RANDOM', 'OT_HASELGROVE', 'OT_REVERSE_HALTON', 'OT_HALTON', 'OT_FAURE', 'OT_MONTE_CARLO', 'OT_FACTORIAL', 'OT_COMPOSITE', 'OT_AXIAL', 'OT_OPT_LHS', 'OT_LHS', 'OT_LHSC', 'OT_FULLFACT', 'OT_SOBOL_INDICES', 'fullfact', 'ff2n', 'pbdesign', 'bbdesign', 'ccdesign', 'lhs'] .. GENERATED FROM PYTHON SOURCE LINES 51-55 Get options schema ------------------ For a given optimization algorithm, e.g. :code:`"DiagonalDOE"`, we can get the options; e.g. .. GENERATED FROM PYTHON SOURCE LINES 55-56 .. code-block:: default print(get_algorithm_options_schema("DiagonalDOE")) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none {'$schema': 'http://json-schema.org/draft-04/schema', 'description': 'Diagonal DOE algorithm', 'additionalProperties': False, 'type': 'object', 'properties': {'eval_jac': {'description': 'Whether to evaluate the Jacobian.', 'type': 'boolean'}, 'n_processes': {'minimum': 1, 'description': 'The number of processes.', 'type': 'integer'}, 'wait_time_between_samples': {'minimum': 0, 'type': 'number'}, 'n_samples': {'minimum': 2, 'description': 'The number of samples. The number of samples must be greater than or equal to 2.', 'type': 'integer'}, 'max_time': {'minimum': 0.0, 'description': 'The maximum runtime in seconds. If 0, no maximum runtime is set.', 'type': 'number'}, 'reverse': {'anyOf': [{'items': {'type': 'string', 'minItems': 1}, 'description': 'The dimensions or variables to sample from their upper bounds to their lower bounds. If None, every dimension will be sampled from its lower bound to its upper bound.', 'type': 'null'}, {'description': 'The dimensions or variables to sample from their upper bounds to their lower bounds. If None, every dimension will be sampled from its lower bound to its upper bound.', 'type': 'array', 'items': {'minItems': 1, 'type': 'string'}}]}}} .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.002 seconds) .. _sphx_glr_download_examples_api_plot_doe.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_doe.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_doe.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_