├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── doc ├── Makefile ├── _build │ ├── doctrees │ │ ├── environment.pickle │ │ ├── factorial.doctree │ │ ├── index.doctree │ │ ├── index_TOC.doctree │ │ ├── randomized.doctree │ │ └── rsm.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _images │ │ ├── lhs.png │ │ └── lhs_custom_distribution.png │ │ ├── _sources │ │ ├── factorial.txt │ │ ├── index.txt │ │ ├── index_TOC.txt │ │ ├── randomized.txt │ │ └── rsm.txt │ │ ├── _static │ │ ├── _default.css │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── contents.png │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── drawing.svg │ │ ├── favicon.ico │ │ ├── file.png │ │ ├── jquery.js │ │ ├── lhs.png │ │ ├── lhs_custom_distribution.png │ │ ├── lhs_custom_distribution.svg │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── minus.png │ │ ├── navigation.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sphinxdoc.css │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── factorial.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── index_TOC.html │ │ ├── objects.inv │ │ ├── randomized.html │ │ ├── rsm.html │ │ ├── search.html │ │ └── searchindex.js ├── _static │ ├── _default.css │ ├── drawing.svg │ ├── favicon.ico │ ├── lhs.png │ ├── lhs_custom_distribution.png │ ├── logo.png │ └── logo.svg ├── _templates │ └── layout.html ├── conf.py ├── factorial.rst ├── index.rst ├── index_TOC.rst ├── randomized.rst └── rsm.rst ├── pyDOE2 ├── __init__.py ├── build_regression_matrix.py ├── doe_box_behnken.py ├── doe_composite.py ├── doe_factorial.py ├── doe_fold.py ├── doe_gsd.py ├── doe_lhs.py ├── doe_plackett_burman.py ├── doe_repeat_center.py ├── doe_star.py ├── doe_union.py └── var_regression_matrix.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.*~ 2 | *.pyc 3 | dist 4 | build 5 | MANIFEST 6 | *.egg-info 7 | .idea 8 | 9 | .vscode/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Abraham D. Lee 2 | Copyright (c) 2018, Rickard Sjögren & Daniel Svensson 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its contributors 16 | may be used to endorse or promote products derived from this software without 17 | specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 21 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 23 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 24 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29 | THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | include LICENSE 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | pyDOE2: An experimental design package for python 2 | ===================================================== 3 | 4 | `pyDOE2` is a fork of the [`pyDOE`](https://github.com/tisimst/pyDOE) package 5 | that is designed to help the scientist, engineer, statistician, etc., to 6 | construct appropriate experimental designs. 7 | 8 | This fork came to life to solve bugs and issues that remained unsolved in the 9 | original package. 10 | 11 | Capabilities 12 | ------------ 13 | 14 | The package currently includes functions for creating designs for any 15 | number of factors: 16 | 17 | - Factorial Designs 18 | - General Full-Factorial (``fullfact``) 19 | - 2-level Full-Factorial (``ff2n``) 20 | - 2-level Fractional Factorial (``fracfact``) 21 | - Plackett-Burman (``pbdesign``) 22 | - Generalized Subset Designs (``gsd``) 23 | - Response-Surface Designs 24 | - Box-Behnken (``bbdesign``) 25 | - Central-Composite (``ccdesign``) 26 | - Randomized Designs 27 | - Latin-Hypercube (``lhs``) 28 | 29 | See the original [pyDOE homepage](http://pythonhosted.org/pyDOE) for details 30 | on usage and other notes. 31 | 32 | What's new? 33 | ---------- 34 | 35 | ### Generalized Subset Designs 36 | 37 | In pyDOE2 version 1.1 the [Generalized Subset Design (GSD)](https://doi.org/10.1021/acs.analchem.7b00506) 38 | is introduced. GSD is a generalization of traditional fractional factorial 39 | designs to problems where factors can have more than two levels. 40 | 41 | In many application problems, factors can have categorical or quantitative 42 | factors on more than two levels. Previous reduced designs have not been 43 | able to deal with such types of problems. Full multi-level factorial 44 | designs can handle such problems but are however not economical regarding 45 | the number of experiments. 46 | 47 | The GSD provide balanced designs in multi-level experiments with the number 48 | of experiments reduced by a user-specified reduction factor. Complementary 49 | reduced designs are also provided analogous to fold-over in traditional 50 | fractional factorial designs. 51 | 52 | GSD is available in pyDOE2 as: 53 | 54 | ``` 55 | import pyDOE2 56 | 57 | levels = [2, 3, 4] # Three factors with 2, 3 or 4 levels respectively. 58 | reduction = 3 # Reduce the number of experiments to approximately a third. 59 | 60 | pyDOE2.gsd(levels, reduction) 61 | ``` 62 | 63 | 64 | Requirements 65 | ------------ 66 | 67 | - NumPy 68 | - SciPy 69 | 70 | Installation and download 71 | ------------------------- 72 | 73 | Through pip: 74 | 75 | ``` 76 | pip install pyDOE2 77 | ``` 78 | 79 | 80 | Credits 81 | ------- 82 | 83 | `pyDOE` original code was originally converted from code by the following 84 | individuals for use with Scilab: 85 | 86 | - Copyright (C) 2012 - 2013 - Michael Baudin 87 | - Copyright (C) 2012 - Maria Christopoulou 88 | - Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 89 | - Copyright (C) 2009 - Yann Collette 90 | - Copyright (C) 2009 - CEA - Jean-Marc Martinez 91 | 92 | - Website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 93 | 94 | `pyDOE` was converted to Python by the following individual: 95 | 96 | - Copyright (c) 2014, Abraham D. Lee 97 | 98 | The following individuals forked and work on `pyDOE2`: 99 | 100 | - Copyright (C) 2018 - Rickard Sjögren and Daniel Svensson 101 | 102 | 103 | License 104 | ------- 105 | 106 | This package is provided under two licenses: 107 | 108 | 1. The *BSD License* (3-clause) 109 | 2. Any other that the author approves (just ask!) 110 | 111 | References 112 | ---------- 113 | 114 | - [Factorial designs](http://en.wikipedia.org/wiki/Factorial_experiment) 115 | - [Plackett-Burman designs](http://en.wikipedia.org/wiki/Plackett-Burman_design) 116 | - [Box-Behnken designs](http://en.wikipedia.org/wiki/Box-Behnken_design) 117 | - [Central composite designs](http://en.wikipedia.org/wiki/Central_composite_design) 118 | - [Latin-Hypercube designs](http://en.wikipedia.org/wiki/Latin_hypercube_sampling) 119 | - Surowiec, Izabella, Ludvig Vikström, Gustaf Hector, Erik Johansson, 120 | Conny Vikström, and Johan Trygg. “Generalized Subset Designs in Analytical 121 | Chemistry.” Analytical Chemistry 89, no. 12 (June 20, 2017): 6491–97. 122 | https://doi.org/10.1021/acs.analchem.7b00506. 123 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | 9 | # Internal variables. 10 | PAPEROPT_a4 = -D latex_paper_size=a4 11 | PAPEROPT_letter = -D latex_paper_size=letter 12 | ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 13 | 14 | .PHONY: help clean html dirhtml pickle json htmlhelp qthelp changes linkcheck doctest # latex 15 | 16 | help: 17 | @echo "Please use \`make ' where is one of" 18 | @echo " html to make standalone HTML files" 19 | @echo " dirhtml to make HTML files named index.html in directories" 20 | @echo " pickle to make pickle files" 21 | @echo " json to make JSON files" 22 | @echo " htmlhelp to make HTML files and a HTML help project" 23 | @echo " qthelp to make HTML files and a qthelp project" 24 | # @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 25 | @echo " changes to make an overview of all changed/added/deprecated items" 26 | @echo " linkcheck to check all external links for integrity" 27 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 28 | 29 | clean: 30 | -rm -rf _build/* 31 | 32 | # The HTML needs latex because the PDF version is linked to: 33 | html: # latex 34 | # (cd _build/latex; make all-pdf) 35 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html 36 | @echo 37 | @echo "Build finished. The HTML pages are in _build/html." 38 | 39 | dirhtml: 40 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml 41 | @echo 42 | @echo "Build finished. The HTML pages are in _build/dirhtml." 43 | 44 | pickle: 45 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle 46 | @echo 47 | @echo "Build finished; now you can process the pickle files." 48 | 49 | json: 50 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json 51 | @echo 52 | @echo "Build finished; now you can process the JSON files." 53 | 54 | htmlhelp: 55 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp 56 | @echo 57 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 58 | ".hhp project file in _build/htmlhelp." 59 | 60 | qthelp: 61 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp 62 | @echo 63 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 64 | ".qhcp project file in _build/qthelp, like this:" 65 | @echo "# qcollectiongenerator _build/qthelp/uncertaintiesPythonpackage.qhcp" 66 | @echo "To view the help file:" 67 | @echo "# assistant -collectionFile _build/qthelp/uncertaintiesPythonpackage.qhc" 68 | 69 | # latex: 70 | # $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex 71 | # @echo 72 | # @echo "Build finished; the LaTeX files are in _build/latex." 73 | # @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ 74 | # "run these through (pdf)latex." 75 | 76 | changes: 77 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes 78 | @echo 79 | @echo "The overview file is in _build/changes." 80 | 81 | linkcheck: 82 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck 83 | @echo 84 | @echo "Link check complete; look for any errors in the above output " \ 85 | "or in _build/linkcheck/output.txt." 86 | 87 | doctest: 88 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest 89 | @echo "Testing of doctests in the sources finished, look at the " \ 90 | "results in _build/doctest/output.txt." 91 | -------------------------------------------------------------------------------- /doc/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /doc/_build/doctrees/factorial.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/factorial.doctree -------------------------------------------------------------------------------- /doc/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /doc/_build/doctrees/index_TOC.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/index_TOC.doctree -------------------------------------------------------------------------------- /doc/_build/doctrees/randomized.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/randomized.doctree -------------------------------------------------------------------------------- /doc/_build/doctrees/rsm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/doctrees/rsm.doctree -------------------------------------------------------------------------------- /doc/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 18a6b7f71dc847e379b853792a6e84e6 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /doc/_build/html/_images/lhs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_images/lhs.png -------------------------------------------------------------------------------- /doc/_build/html/_images/lhs_custom_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_images/lhs_custom_distribution.png -------------------------------------------------------------------------------- /doc/_build/html/_sources/factorial.txt: -------------------------------------------------------------------------------- 1 | .. _factorial: 2 | 3 | ================================================================================ 4 | Factorial Designs 5 | ================================================================================ 6 | 7 | In this section, the following kinds of *factorial designs* will be described: 8 | 9 | - :ref:`General Full-Factorial ` 10 | - :ref:`2-Level Full-Factorial <2_level_full_factorial>` 11 | - :ref:`2-Level Fractional-Factorial ` 12 | - :ref:`Plackett-Burman ` 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | 20 | .. index:: General Full-Factorial 21 | 22 | .. _general_full_factorial: 23 | 24 | General Full-Factorial (``fullfact``) 25 | ===================================== 26 | 27 | This kind of design offers full flexibility as to the number of discrete 28 | levels for each factor in the design. Its usage is simple:: 29 | 30 | >>> fullfact(levels) 31 | 32 | where ``levels`` is an array of integers, like:: 33 | 34 | >>> fullfact([2, 3]) 35 | array([[ 0., 0.], 36 | [ 1., 0.], 37 | [ 0., 1.], 38 | [ 1., 1.], 39 | [ 0., 2.], 40 | [ 1., 2.]]) 41 | 42 | As can be seen in the output, the design matrix has as many columns as 43 | items in the input array. 44 | 45 | .. index:: 2-Level Full Factorial 46 | 47 | .. _2_level_full_factorial: 48 | 49 | 2-Level Full-Factorial (``ff2n``) 50 | ================================= 51 | 52 | This function is a convenience wrapper to ``fullfact`` that forces all the 53 | factors to have two levels each, you simple tell it how many factors to 54 | create a design for:: 55 | 56 | >>> ff2n(3) 57 | array([[-1., -1., -1.], 58 | [ 1., -1., -1.], 59 | [-1., 1., -1.], 60 | [ 1., 1., -1.], 61 | [-1., -1., 1.], 62 | [ 1., -1., 1.], 63 | [-1., 1., 1.], 64 | [ 1., 1., 1.]]) 65 | 66 | .. index:: 2-Level Fractional Factorial 67 | 68 | .. _fractional_factorial: 69 | 70 | 2-Level Fractional-Factorial (``fracfact``) 71 | =========================================== 72 | 73 | This function requires a little more knowledge of how the *confounding* 74 | will be allowed (this means that some factor effects get muddled with 75 | other interaction effects, so it's harder to distinguish between them). 76 | 77 | Let's assume that we just can't afford (for whatever reason) the number 78 | of runs in a *full-factorial* design. We can systematically decide on a 79 | *fraction of the full-factorial* by allowing some of the factor *main 80 | effects* to be confounded with other factor *interaction effects*. This 81 | is done by defining an *alias* structure that defines, symbolically, 82 | these interactions. These alias structures are written like "C = AB" or 83 | "I = ABC", or "AB = CD", etc. These define how one column is related to 84 | the others. 85 | 86 | For example, the alias "C = AB" or "I = ABC" indicate that there are 87 | three factors (A, B, and C) and that the main effect of factor 88 | C is confounded with the interaction effect of the product AB, and by 89 | extension, A is confounded with BC and B is confounded with AC. A full- 90 | factorial design with these three factors results in a design matrix with 91 | 8 runs, but we will assume that we can only afford 4 of those runs. To 92 | create this *fractional* design, we need a matrix with three columns, one 93 | for A, B, and C, only now where the levels in the C column is created by 94 | the product of the A and B columns. 95 | 96 | The input to ``fracfact`` is a generator string of symbolic characters 97 | (lowercase or uppercase, but not both) separated by spaces, like:: 98 | 99 | >>> gen = 'a b ab' 100 | 101 | This design would result in a 3-column matrix, where the third column is 102 | implicitly defined as ``"c = ab"``. This means that the factor in the third 103 | column is confounded with the interaction of the factors in the first two 104 | columns. The design ends up looking like this:: 105 | 106 | >>> fracfact('a b ab') 107 | array([[-1., -1., 1.], 108 | [ 1., -1., -1.], 109 | [-1., 1., -1.], 110 | [ 1., 1., 1.]]) 111 | 112 | Fractional factorial designs are usually specified using the notation 113 | 2^(k-p), where k is the number of columns and p is the number 114 | of effects that are confounded. In terms of *resolution* level, higher is 115 | "better". The above design would be considered a 2^(3-1) 116 | fractional factorial design, a 1/2-fraction design, or a *Resolution III* 117 | design (since the smallest alias "I=ABC" has three terms on the right-hand 118 | side). Another common design is a Resolution III, 2^(7-4) 119 | fractional factorial and would be created using the following string 120 | generator:: 121 | 122 | >>> fracfact('a b ab c ac bc abc') 123 | array([[-1., -1., 1., -1., 1., 1., -1.], 124 | [ 1., -1., -1., -1., -1., 1., 1.], 125 | [-1., 1., -1., -1., 1., -1., 1.], 126 | [ 1., 1., 1., -1., -1., -1., -1.], 127 | [-1., -1., 1., 1., -1., -1., 1.], 128 | [ 1., -1., -1., 1., 1., -1., -1.], 129 | [-1., 1., -1., 1., -1., 1., -1.], 130 | [ 1., 1., 1., 1., 1., 1., 1.]]) 131 | 132 | More sophisticated generator strings can be created using the "+" and 133 | "-" operators. The "-" operator swaps the levels of that column like 134 | this:: 135 | 136 | >>> fracfact('a b -ab') 137 | array([[-1., -1., -1.], 138 | [ 1., -1., 1.], 139 | [-1., 1., 1.], 140 | [ 1., 1., -1.]]) 141 | 142 | In order to reduce confounding, we can utilize the ``fold`` function:: 143 | 144 | >>> m = fracfact('a b ab') 145 | >>> fold(m) 146 | array([[-1., -1., 1.], 147 | [ 1., -1., -1.], 148 | [-1., 1., -1.], 149 | [ 1., 1., 1.], 150 | [ 1., 1., -1.], 151 | [-1., 1., 1.], 152 | [ 1., -1., 1.], 153 | [-1., -1., -1.]]) 154 | 155 | Applying the fold to all columns in the design breaks the alias chains 156 | between every *main factor and two-factor interactions*. This means that 157 | we can then estimate *all the main effects clear of any two-factor 158 | interactions*. Typically, when all columns are folded, this "upgrades" 159 | the resolution of the design. 160 | 161 | By default, ``fold`` applies the level swapping to all columns, but we can 162 | fold specific columns (first column = 0), if desired, by supplying an array 163 | to the keyword ``columns``:: 164 | 165 | >>> fold(m, columns=[2]) 166 | array([[-1., -1., 1.], 167 | [ 1., -1., -1.], 168 | [-1., 1., -1.], 169 | [ 1., 1., 1.], 170 | [-1., -1., -1.], 171 | [ 1., -1., 1.], 172 | [-1., 1., 1.], 173 | [ 1., 1., -1.]]) 174 | 175 | .. note:: 176 | Care should be taken to decide the appropriate alias structure for 177 | your design and the effects that folding has on it. 178 | 179 | .. index:: Plackett-Burman 180 | 181 | .. _plackett_burman: 182 | 183 | Plackett-Burman (``pbdesign``) 184 | ============================== 185 | 186 | Another way to generate fractional-factorial designs is through the use 187 | of **Plackett-Burman** designs. These designs are unique in that the 188 | number of trial conditions (rows) expands by multiples of four (e.g. 4, 189 | 8, 12, etc.). The max number of columns allowed before a design increases 190 | the number of rows is always one less than the next higher multiple of four. 191 | 192 | For example, I can use up to 3 factors in a design with 4 rows:: 193 | 194 | >>> pbdesign(3) 195 | array([[-1., -1., 1.], 196 | [ 1., -1., -1.], 197 | [-1., 1., -1.], 198 | [ 1., 1., 1.]]) 199 | 200 | But if I want to do 4 factors, the design needs to increase the number 201 | of rows up to the next multiple of four (8 in this case):: 202 | 203 | >>> pbdesign(4) 204 | array([[-1., -1., 1., -1.], 205 | [ 1., -1., -1., -1.], 206 | [-1., 1., -1., -1.], 207 | [ 1., 1., 1., -1.], 208 | [-1., -1., 1., 1.], 209 | [ 1., -1., -1., 1.], 210 | [-1., 1., -1., 1.], 211 | [ 1., 1., 1., 1.]]) 212 | 213 | Thus, an 8-run Plackett-Burman design can handle up to (8 - 1) = 7 factors. 214 | 215 | As a side note, It just so happens that the Plackett-Burman and 2^(7-4) 216 | fractional factorial design are identical:: 217 | 218 | >>> np.all(pbdesign(7)==fracfact('a b ab c ac bc abc')) 219 | True 220 | 221 | .. index:: Factorial Designs Support 222 | 223 | More Information 224 | ================ 225 | 226 | If the user needs more information about appropriate designs, please 227 | consult the following articles on Wikipedia: 228 | 229 | - `Factorial designs`_ 230 | - `Plackett-Burman designs`_ 231 | 232 | There is also a wealth of information on the `NIST`_ website about the 233 | various design matrices that can be created as well as detailed information 234 | about designing/setting-up/running experiments in general. 235 | 236 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 237 | 238 | .. _author: mailto:tisimst@gmail.com 239 | .. _Factorial designs: http://en.wikipedia.org/wiki/Factorial_experiment 240 | .. _Plackett-Burman designs: http://en.wikipedia.org/wiki/Plackett-Burman_design 241 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm -------------------------------------------------------------------------------- /doc/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: Design of experiments for Python 3 | :keywords: DOE, design of experiments, experimental design, 4 | optimization, statistics 5 | 6 | ===================================================== 7 | ``pyDOE``: The experimental design package for python 8 | ===================================================== 9 | 10 | The ``pyDOE`` package is designed to help the 11 | **scientist, engineer, statistician,** etc., to construct appropriate 12 | **experimental designs**. 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | Capabilities 20 | ============ 21 | 22 | The package currently includes functions for creating designs for any 23 | number of factors: 24 | 25 | - :ref:`Factorial Designs ` 26 | 27 | #. :ref:`General Full-Factorial ` (``fullfact``) 28 | 29 | #. :ref:`2-Level Full-Factorial <2_level_full_factorial>` (``ff2n``) 30 | 31 | #. :ref:`2-Level Fractional-Factorial ` (``fracfact``) 32 | 33 | #. :ref:`Plackett-Burman ` (``pbdesign``) 34 | 35 | - :ref:`Response-Surface Designs ` 36 | 37 | #. :ref:`Box-Behnken ` (``bbdesign``) 38 | 39 | #. :ref:`Central-Composite ` (``ccdesign``) 40 | 41 | - :ref:`Randomized Designs ` 42 | 43 | #. :ref:`Latin-Hypercube ` (``lhs``) 44 | 45 | Requirements 46 | ============ 47 | 48 | - NumPy 49 | - SciPy 50 | 51 | .. index:: installation 52 | 53 | .. _installing this package: 54 | 55 | Installation and download 56 | ========================= 57 | 58 | Important note 59 | -------------- 60 | 61 | The installation commands below should be **run in a DOS or Unix 62 | command shell** (*not* in a Python shell). 63 | 64 | Under Windows (version 7 and earlier), a command shell can be obtained 65 | by running ``cmd.exe`` (through the Run… menu item from the Start 66 | menu). Under Unix (Linux, Mac OS X,…), a Unix shell is available when 67 | opening a terminal (in Mac OS X, the Terminal program is found in the 68 | Utilities folder, which can be accessed through the Go menu in the 69 | Finder). 70 | 71 | Automatic install or upgrade 72 | ---------------------------- 73 | 74 | One of the automatic installation or upgrade procedures below might work 75 | on your system, if you have a Python package installer or use certain 76 | Linux distributions. 77 | 78 | Under Unix, it may be necessary to prefix the commands below with 79 | ``sudo``, so that the installation program has **sufficient access 80 | rights to the system**. 81 | 82 | If you have `pip `_, you can try to install 83 | the latest version with 84 | 85 | .. code-block:: sh 86 | 87 | pip install --upgrade pyDOE 88 | 89 | If you have setuptools_, you can try to automatically install or 90 | upgrade this package with 91 | 92 | .. code-block:: sh 93 | 94 | easy_install --upgrade pyDOE 95 | 96 | Manual download and install 97 | --------------------------- 98 | 99 | Alternatively, you can simply download_ the package archive from the 100 | Python Package Index (PyPI) and unpack it. The package can then be 101 | installed by **going into the unpacked directory** 102 | (:file:`pyDOE-...`), and running the provided :file:`setup.py` 103 | program with 104 | 105 | .. code-block:: sh 106 | 107 | python setup.py install 108 | 109 | or, for an installation in the user Python library (no additional access 110 | rights needed): 111 | 112 | .. code-block:: sh 113 | 114 | python setup.py install --user 115 | 116 | or, for an installation in a custom directory :file:`my_directory`: 117 | 118 | .. code-block:: sh 119 | 120 | python setup.py install --install-lib my_directory 121 | 122 | or, if additional access rights are needed (Unix): 123 | 124 | .. code-block:: sh 125 | 126 | sudo python setup.py install 127 | 128 | You can also simply **move** the :file:`pyDOE-py*` directory 129 | that corresponds best to your version of Python to a location that 130 | Python can import from (directory in which scripts using 131 | :mod:`pyDOE` are run, etc.); the chosen 132 | :file:`pyDOE-py*` directory should then be renamed 133 | :file:`pyDOE`. Python 3 users should then run ``2to3 -w .`` 134 | from inside this directory so as to automatically adapt the code to 135 | Python 3. 136 | 137 | Source code 138 | ----------- 139 | 140 | The latest, bleeding-edge but working `code 141 | `_ 142 | and `documentation source 143 | `_ are 144 | available `on GitHub `_. 145 | 146 | .. index:: support 147 | 148 | Contact 149 | ======= 150 | 151 | Any feedback, questions, bug reports, or success stores should 152 | be sent to the `author`_. I'd love to hear from you! 153 | 154 | Credits 155 | ======= 156 | 157 | This code was originally published by the following individuals for use with 158 | Scilab: 159 | 160 | - Copyright (C) 2012 - 2013 - Michael Baudin 161 | - Copyright (C) 2012 - Maria Christopoulou 162 | - Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 163 | - Copyright (C) 2009 - Yann Collette 164 | - Copyright (C) 2009 - CEA - Jean-Marc Martinez 165 | 166 | - Website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 167 | 168 | Much thanks goes to these individuals. 169 | 170 | License 171 | ======= 172 | 173 | This package is provided under two licenses: 174 | 175 | 1. The *BSD License* (3-Clause) 176 | 2. Any other that the author approves (just ask!) 177 | 178 | References 179 | ========== 180 | 181 | - `Factorial designs`_ 182 | - `Plackett-Burman designs`_ 183 | - `Box-Behnken designs`_ 184 | - `Central composite designs`_ 185 | - `Latin-Hypercube designs`_ 186 | 187 | There is also a wealth of information on the `NIST`_ website about the 188 | various design matrices that can be created as well as detailed information 189 | about designing/setting-up/running experiments in general. 190 | 191 | .. _author: mailto:tisimst@gmail.com 192 | .. _Factorial designs: http://en.wikipedia.org/wiki/Factorial_experiment 193 | .. _Box-Behnken designs: http://en.wikipedia.org/wiki/Box-Behnken_design 194 | .. _Central composite designs: http://en.wikipedia.org/wiki/Central_composite_design 195 | .. _Plackett-Burman designs: http://en.wikipedia.org/wiki/Plackett-Burman_design 196 | .. _Latin-Hypercube designs: http://en.wikipedia.org/wiki/Latin_hypercube_sampling 197 | .. _setuptools: http://pypi.python.org/pypi/setuptools 198 | .. _download: http://pypi.python.org/pypi/pyDOE/#downloads 199 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm 200 | -------------------------------------------------------------------------------- /doc/_build/html/_sources/index_TOC.txt: -------------------------------------------------------------------------------- 1 | Table of Contents 2 | ================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | Overview 8 | Factorial Designs 9 | Response Surface Designs 10 | Randomized Designs 11 | 12 | -------------------------------------------------------------------------------- /doc/_build/html/_sources/randomized.txt: -------------------------------------------------------------------------------- 1 | .. index:: Randomized Designs 2 | 3 | .. _randomized: 4 | 5 | ================================================================================ 6 | Randomized Designs 7 | ================================================================================ 8 | 9 | In this section, the following kinds of *randomized designs* will 10 | be described: 11 | 12 | - Latin-Hypercube 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | .. index:: Latin-Hypercube 20 | 21 | .. _latin_hypercube: 22 | 23 | Latin-Hypercube (``lhs``) 24 | ========================= 25 | 26 | .. image:: _static/lhs.png 27 | 28 | Latin-hypercube designs can be created using the following simple syntax:: 29 | 30 | >>> lhs(n, [samples, criterion, iterations]) 31 | 32 | where 33 | 34 | * **n**: an integer that designates the number of factors (required) 35 | * **samples**: an integer that designates the number of sample points to 36 | generate for each factor (default: n) 37 | * **criterion**: a string that tells ``lhs`` how to sample the points 38 | (default: None, which simply randomizes the points within the intervals): 39 | 40 | - "center" or "c": center the points within the sampling intervals 41 | - "maximin" or "m": maximize the minimum distance between points, but 42 | place the point in a randomized location within its interval 43 | - "centermaximin" or "cm": same as "maximin", but centered within the 44 | intervals 45 | - "correlation" or "corr": minimize the maximum correlation coefficient 46 | 47 | The output design scales all the variable ranges from zero to one which 48 | can then be transformed as the user wishes (like to a specific statistical 49 | distribution using the `scipy.stats.distributions`_ ``ppf`` (inverse 50 | cumulative distribution) function. An example of this is :ref:`shown below 51 | `. 52 | 53 | For example, if I wanted to transform the uniform distribution of 8 samples 54 | to a normal distribution (mean=0, standard deviation=1), I would do 55 | something like:: 56 | 57 | >>> from scipy.stats.distributions import norm 58 | >>> lhd = lhs(2, samples=5) 59 | >>> lhd = norm(loc=0, scale=1).ppf(lhd) # this applies to both factors here 60 | 61 | Graphically, each transformation would look like the following, going 62 | from the blue sampled points (from using ``lhs``) to the green 63 | sampled points that are normally distributed: 64 | 65 | .. image:: _static/lhs_custom_distribution.png 66 | 67 | Examples 68 | -------- 69 | 70 | A basic 4-factor latin-hypercube design:: 71 | 72 | >>> lhs(4, criterion='center') 73 | array([[ 0.875, 0.625, 0.875, 0.125], 74 | [ 0.375, 0.125, 0.375, 0.375], 75 | [ 0.625, 0.375, 0.125, 0.625], 76 | [ 0.125, 0.875, 0.625, 0.875]]) 77 | 78 | Let's say we want more samples, like 10:: 79 | 80 | >>> lhs(4, samples=10, criterion='center') 81 | array([[ 0.05, 0.05, 0.15, 0.15], 82 | [ 0.55, 0.85, 0.95, 0.75], 83 | [ 0.25, 0.25, 0.45, 0.25], 84 | [ 0.45, 0.35, 0.75, 0.45], 85 | [ 0.75, 0.55, 0.25, 0.55], 86 | [ 0.95, 0.45, 0.35, 0.05], 87 | [ 0.35, 0.95, 0.05, 0.65], 88 | [ 0.15, 0.65, 0.55, 0.35], 89 | [ 0.85, 0.75, 0.85, 0.85], 90 | [ 0.65, 0.15, 0.65, 0.95]]) 91 | 92 | .. _statistical_distribution_usage: 93 | 94 | Customizing with Statistical Distributions 95 | ------------------------------------------ 96 | 97 | Now, let's say we want to transform these designs to be normally 98 | distributed with means = [1, 2, 3, 4] and standard deviations = [0.1, 99 | 0.5, 1, 0.25]:: 100 | 101 | >>> design = lhs(4, samples=10) 102 | >>> from scipy.stats.distributions import norm 103 | >>> means = [1, 2, 3, 4] 104 | >>> stdvs = [0.1, 0.5, 1, 0.25] 105 | >>> for i in xrange(4): 106 | ... design[:, i] = norm(loc=means[i], scale=stdvs[i]).ppf(design[:, i]) 107 | ... 108 | >>> design 109 | array([[ 0.84947986, 2.16716215, 2.81669487, 3.96369414], 110 | [ 1.15820413, 1.62692745, 2.28145071, 4.25062028], 111 | [ 0.99159933, 2.6444164 , 2.14908071, 3.45706066], 112 | [ 1.02627463, 1.8568382 , 3.8172492 , 4.16756309], 113 | [ 1.07459909, 2.30561153, 4.09567327, 4.3881782 ], 114 | [ 0.896079 , 2.0233295 , 1.54235909, 3.81888286], 115 | [ 1.00415 , 2.4246118 , 3.3500082 , 4.07788558], 116 | [ 0.91999246, 1.50179698, 2.70669743, 3.7826346 ], 117 | [ 0.97030478, 1.99322045, 3.178122 , 4.04955409], 118 | [ 1.12124679, 1.22454846, 4.52414072, 3.8707982 ]]) 119 | 120 | .. note:: 121 | Methods for "space-filling" designs and "orthogonal" designs are in 122 | the works, so stay tuned! However, simply increasing the samples 123 | reduces the need for these anyway. 124 | 125 | .. index:: Latin-Hypercube Designs Support 126 | 127 | More Information 128 | ================ 129 | 130 | If the user needs more information about appropriate designs, please 131 | consult the following articles on Wikipedia: 132 | 133 | - `Latin-Hypercube designs`_ 134 | 135 | There is also a wealth of information on the `NIST`_ website about the 136 | various design matrices that can be created as well as detailed information 137 | about designing/setting-up/running experiments in general. 138 | 139 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 140 | 141 | .. _author: mailto:tisimst@gmail.com 142 | .. _Latin-Hypercube designs: http://en.wikipedia.org/wiki/Latin_hypercube_sampling 143 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm 144 | .. _scipy.stats.distributions: http://docs.scipy.org/doc/scipy/reference/stats.html -------------------------------------------------------------------------------- /doc/_build/html/_sources/rsm.txt: -------------------------------------------------------------------------------- 1 | .. index:: Response Surface Designs, RSM 2 | 3 | .. _response_surface: 4 | 5 | ================================================================================ 6 | Response Surface Designs 7 | ================================================================================ 8 | 9 | In this section, the following kinds of *response surface designs* will 10 | be described: 11 | 12 | - :ref:`Box-Behnken ` 13 | - :ref:`Central Composite ` 14 | 15 | .. hint:: 16 | All available designs can be accessed after a simple import statement:: 17 | 18 | >>> from pyDOE import * 19 | 20 | .. index:: Box-Behnken 21 | 22 | .. _box_behnken: 23 | 24 | Box-Behnken (``bbdesign``) 25 | ========================== 26 | 27 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/bb.gif 28 | 29 | Box-Behnken designs can be created using the following simple syntax:: 30 | 31 | >>> bbdesign(n, center) 32 | 33 | where ``n`` is the number of factors (at least 3 required) and ``center`` 34 | is the number of center points to include. If no inputs given to 35 | ``center``, then a pre-determined number of points are automatically 36 | included. 37 | 38 | Examples 39 | -------- 40 | 41 | The default 3-factor Box-Behnken design:: 42 | 43 | >>> bbdesign(3) 44 | array([[-1., -1., 0.], 45 | [ 1., -1., 0.], 46 | [-1., 1., 0.], 47 | [ 1., 1., 0.], 48 | [-1., 0., -1.], 49 | [ 1., 0., -1.], 50 | [-1., 0., 1.], 51 | [ 1., 0., 1.], 52 | [ 0., -1., -1.], 53 | [ 0., 1., -1.], 54 | [ 0., -1., 1.], 55 | [ 0., 1., 1.], 56 | [ 0., 0., 0.], 57 | [ 0., 0., 0.], 58 | [ 0., 0., 0.]]) 59 | 60 | A customized design with four factors, but only a single center point:: 61 | 62 | >>> bbdesign(4, center=1) 63 | array([[-1., -1., 0., 0.], 64 | [ 1., -1., 0., 0.], 65 | [-1., 1., 0., 0.], 66 | [ 1., 1., 0., 0.], 67 | [-1., 0., -1., 0.], 68 | [ 1., 0., -1., 0.], 69 | [-1., 0., 1., 0.], 70 | [ 1., 0., 1., 0.], 71 | [-1., 0., 0., -1.], 72 | [ 1., 0., 0., -1.], 73 | [-1., 0., 0., 1.], 74 | [ 1., 0., 0., 1.], 75 | [ 0., -1., -1., 0.], 76 | [ 0., 1., -1., 0.], 77 | [ 0., -1., 1., 0.], 78 | [ 0., 1., 1., 0.], 79 | [ 0., -1., 0., -1.], 80 | [ 0., 1., 0., -1.], 81 | [ 0., -1., 0., 1.], 82 | [ 0., 1., 0., 1.], 83 | [ 0., 0., -1., -1.], 84 | [ 0., 0., 1., -1.], 85 | [ 0., 0., -1., 1.], 86 | [ 0., 0., 1., 1.], 87 | [ 0., 0., 0., 0.]]) 88 | 89 | .. index:: Central Composite 90 | 91 | .. _central_composite: 92 | 93 | Central Composite (``ccdesign``) 94 | ================================ 95 | 96 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/fig5.gif 97 | 98 | Central composite designs can be created and customized using the syntax:: 99 | 100 | >>> ccdesign(n, center, alpha, face) 101 | 102 | where 103 | 104 | - ``n`` is the number of factors, 105 | 106 | - ``center`` is a 2-tuple of center points (one for the factorial block, 107 | one for the star block, default (4, 4)), 108 | 109 | - ``alpha`` is either "orthogonal" (or "o", default) or "rotatable" 110 | (or "r") 111 | 112 | - ``face`` is either "circumscribed" (or "ccc", default), "inscribed" 113 | (or "cci"), or "faced" (or "ccf"). 114 | 115 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/ccd2.gif 116 | 117 | The two optional keyword arguments ``alpha`` and ``face`` help describe 118 | how the variance in the quadratic approximation is distributed. Please 119 | see the `NIST`_ web pages if you are uncertain which options are suitable 120 | for your situation. 121 | 122 | .. note:: 123 | - 'ccc' and 'cci' can be rotatable designs, but 'ccf' cannot. 124 | - If ``face`` is specified, while ``alpha`` is not, then the default 125 | value of ``alpha`` is 'orthogonal'. 126 | 127 | Examples 128 | -------- 129 | 130 | Simplest input, assuming default kwargs:: 131 | 132 | >>> ccdesign(2) 133 | array([[-1. , -1. ], 134 | [ 1. , -1. ], 135 | [-1. , 1. ], 136 | [ 1. , 1. ], 137 | [ 0. , 0. ], 138 | [ 0. , 0. ], 139 | [ 0. , 0. ], 140 | [ 0. , 0. ], 141 | [-1.41421356, 0. ], 142 | [ 1.41421356, 0. ], 143 | [ 0. , -1.41421356], 144 | [ 0. , 1.41421356], 145 | [ 0. , 0. ], 146 | [ 0. , 0. ], 147 | [ 0. , 0. ], 148 | [ 0. , 0. ]]) 149 | 150 | More customized input, say, for a set of computer experiments where there 151 | isn't variability so we only need a single center point:: 152 | 153 | >>> ccdesign(3, center=(0, 1), alpha='r', face='cci') 154 | array([[-0.59460356, -0.59460356, -0.59460356], 155 | [ 0.59460356, -0.59460356, -0.59460356], 156 | [-0.59460356, 0.59460356, -0.59460356], 157 | [ 0.59460356, 0.59460356, -0.59460356], 158 | [-0.59460356, -0.59460356, 0.59460356], 159 | [ 0.59460356, -0.59460356, 0.59460356], 160 | [-0.59460356, 0.59460356, 0.59460356], 161 | [ 0.59460356, 0.59460356, 0.59460356], 162 | [-1. , 0. , 0. ], 163 | [ 1. , 0. , 0. ], 164 | [ 0. , -1. , 0. ], 165 | [ 0. , 1. , 0. ], 166 | [ 0. , 0. , -1. ], 167 | [ 0. , 0. , 1. ], 168 | [ 0. , 0. , 0. ]]) 169 | 170 | .. index:: Response Surface Designs Support 171 | 172 | More Information 173 | ================ 174 | 175 | If the user needs more information about appropriate designs, please 176 | consult the following articles on Wikipedia: 177 | 178 | - `Box-Behnken designs`_ 179 | - `Central composite designs`_ 180 | 181 | There is also a wealth of information on the `NIST`_ website about the 182 | various design matrices that can be created as well as detailed information 183 | about designing/setting-up/running experiments in general. 184 | 185 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 186 | 187 | .. _author: mailto:tisimst@gmail.com 188 | .. _Box-Behnken designs: http://en.wikipedia.org/wiki/Box-Behnken_design 189 | .. _Central composite designs: http://en.wikipedia.org/wiki/Central_composite_design 190 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm -------------------------------------------------------------------------------- /doc/_build/html/_static/_default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Alternate Sphinx design 3 | * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl. 4 | */ 5 | 6 | body { 7 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; 8 | font-size: 14px; 9 | letter-spacing: -0.01em; 10 | line-height: 150%; 11 | text-align: center; 12 | /*background-color: #AFC1C4; */ 13 | background-color: #BFD1D4; 14 | color: black; 15 | padding: 0; 16 | border: 1px solid #aaa; 17 | 18 | margin: 0px 80px 0px 80px; 19 | min-width: 740px; 20 | } 21 | 22 | a { 23 | color: #CA7900; 24 | text-decoration: none; 25 | } 26 | 27 | a:hover { 28 | color: #2491CF; 29 | } 30 | 31 | pre { 32 | font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 33 | font-size: 0.95em; 34 | letter-spacing: 0.015em; 35 | padding: 0.5em; 36 | border: 1px solid #ccc; 37 | background-color: #f8f8f8; 38 | } 39 | 40 | td.linenos pre { 41 | padding: 0.5em 0; 42 | border: 0; 43 | background-color: transparent; 44 | color: #aaa; 45 | } 46 | 47 | table.highlighttable { 48 | margin-left: 0.5em; 49 | } 50 | 51 | table.highlighttable td { 52 | padding: 0 0.5em 0 0.5em; 53 | } 54 | 55 | cite, code, tt { 56 | font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 57 | font-size: 0.95em; 58 | letter-spacing: 0.01em; 59 | } 60 | 61 | hr { 62 | border: 1px solid #abc; 63 | margin: 2em; 64 | } 65 | 66 | tt { 67 | background-color: #f2f2f2; 68 | border-bottom: 1px solid #ddd; 69 | color: #333; 70 | } 71 | 72 | tt.descname { 73 | background-color: transparent; 74 | font-weight: bold; 75 | font-size: 1.2em; 76 | border: 0; 77 | } 78 | 79 | tt.descclassname { 80 | background-color: transparent; 81 | border: 0; 82 | } 83 | 84 | tt.xref { 85 | background-color: transparent; 86 | font-weight: bold; 87 | border: 0; 88 | } 89 | 90 | a tt { 91 | background-color: transparent; 92 | font-weight: bold; 93 | border: 0; 94 | color: #CA7900; 95 | } 96 | 97 | a tt:hover { 98 | color: #2491CF; 99 | } 100 | 101 | dl { 102 | margin-bottom: 15px; 103 | } 104 | 105 | dd p { 106 | margin-top: 0px; 107 | } 108 | 109 | dd ul, dd table { 110 | margin-bottom: 10px; 111 | } 112 | 113 | dd { 114 | margin-top: 3px; 115 | margin-bottom: 10px; 116 | margin-left: 30px; 117 | } 118 | 119 | .refcount { 120 | color: #060; 121 | } 122 | 123 | dt:target, 124 | .highlight { 125 | background-color: #fbe54e; 126 | } 127 | 128 | dl.class, dl.function { 129 | border-top: 2px solid #888; 130 | } 131 | 132 | dl.method, dl.attribute { 133 | border-top: 1px solid #aaa; 134 | } 135 | 136 | dl.glossary dt { 137 | font-weight: bold; 138 | font-size: 1.1em; 139 | } 140 | 141 | pre { 142 | line-height: 120%; 143 | } 144 | 145 | pre a { 146 | color: inherit; 147 | text-decoration: underline; 148 | } 149 | 150 | .first { 151 | margin-top: 0 !important; 152 | } 153 | 154 | div.document { 155 | background-color: white; 156 | text-align: left; 157 | background-image: url(contents.png); 158 | background-repeat: repeat-x; 159 | } 160 | 161 | /* 162 | div.documentwrapper { 163 | width: 100%; 164 | } 165 | */ 166 | 167 | div.clearer { 168 | clear: both; 169 | } 170 | 171 | div.related h3 { 172 | display: none; 173 | } 174 | 175 | div.related ul { 176 | background-image: url(navigation.png); 177 | height: 2em; 178 | list-style: none; 179 | border-top: 1px solid #ddd; 180 | border-bottom: 1px solid #ddd; 181 | margin: 0; 182 | padding-left: 10px; 183 | } 184 | 185 | div.related ul li { 186 | margin: 0; 187 | padding: 0; 188 | height: 2em; 189 | float: left; 190 | } 191 | 192 | div.related ul li.right { 193 | float: right; 194 | margin-right: 5px; 195 | } 196 | 197 | div.related ul li a { 198 | margin: 0; 199 | padding: 0 5px 0 5px; 200 | line-height: 1.75em; 201 | color: #EE9816; 202 | } 203 | 204 | div.related ul li a:hover { 205 | color: #3CA8E7; 206 | } 207 | 208 | div.body { 209 | margin: 0; 210 | padding: 0.5em 20px 20px 20px; 211 | } 212 | 213 | div.bodywrapper { 214 | margin: 0 240px 0 0; 215 | border-right: 1px solid #ccc; 216 | } 217 | 218 | div.body a { 219 | text-decoration: underline; 220 | } 221 | 222 | div.sphinxsidebar { 223 | margin: 0; 224 | padding: 0.5em 15px 15px 0; 225 | width: 210px; 226 | float: right; 227 | text-align: left; 228 | /* margin-left: -100%; */ 229 | } 230 | 231 | div.sphinxsidebar h4, div.sphinxsidebar h3 { 232 | margin: 1em 0 0.5em 0; 233 | font-size: 0.9em; 234 | padding: 0.1em 0 0.1em 0.5em; 235 | color: white; 236 | border: 1px solid #86989B; 237 | background-color: #AFC1C4; 238 | } 239 | 240 | div.sphinxsidebar ul { 241 | padding-left: 1.5em; 242 | margin-top: 7px; 243 | list-style: none; 244 | padding: 0; 245 | line-height: 130%; 246 | } 247 | 248 | div.sphinxsidebar ul ul { 249 | list-style: square; 250 | margin-left: 20px; 251 | } 252 | 253 | p { 254 | margin: 0.8em 0 0.5em 0; 255 | } 256 | 257 | p.rubric { 258 | font-weight: bold; 259 | } 260 | 261 | h1 { 262 | margin: 0; 263 | padding: 0.7em 0 0.3em 0; 264 | font-size: 1.5em; 265 | color: #11557C; 266 | } 267 | 268 | h2 { 269 | margin: 1.3em 0 0.2em 0; 270 | font-size: 1.35em; 271 | padding: 0; 272 | } 273 | 274 | h3 { 275 | margin: 1em 0 -0.3em 0; 276 | font-size: 1.2em; 277 | } 278 | 279 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { 280 | color: black!important; 281 | } 282 | 283 | h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { 284 | display: none; 285 | margin: 0 0 0 0.3em; 286 | padding: 0 0.2em 0 0.2em; 287 | color: #aaa!important; 288 | } 289 | 290 | h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, 291 | h5:hover a.anchor, h6:hover a.anchor { 292 | display: inline; 293 | } 294 | 295 | h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, 296 | h5 a.anchor:hover, h6 a.anchor:hover { 297 | color: #777; 298 | background-color: #eee; 299 | } 300 | 301 | table { 302 | border-collapse: collapse; 303 | margin: 0 -0.5em 0 -0.5em; 304 | } 305 | 306 | table td, table th { 307 | padding: 0.2em 0.5em 0.2em 0.5em; 308 | } 309 | 310 | div.footer { 311 | background-color: #E3EFF1; 312 | color: #86989B; 313 | padding: 3px 8px 3px 0; 314 | clear: both; 315 | font-size: 0.8em; 316 | text-align: right; 317 | } 318 | 319 | div.footer a { 320 | color: #86989B; 321 | text-decoration: underline; 322 | } 323 | 324 | div.pagination { 325 | margin-top: 2em; 326 | padding-top: 0.5em; 327 | border-top: 1px solid black; 328 | text-align: center; 329 | } 330 | 331 | div.sphinxsidebar ul.toc { 332 | margin: 1em 0 1em 0; 333 | padding: 0 0 0 0.5em; 334 | list-style: none; 335 | } 336 | 337 | div.sphinxsidebar ul.toc li { 338 | margin: 0.5em 0 0.5em 0; 339 | font-size: 0.9em; 340 | line-height: 130%; 341 | } 342 | 343 | div.sphinxsidebar ul.toc li p { 344 | margin: 0; 345 | padding: 0; 346 | } 347 | 348 | div.sphinxsidebar ul.toc ul { 349 | margin: 0.2em 0 0.2em 0; 350 | padding: 0 0 0 1.8em; 351 | } 352 | 353 | div.sphinxsidebar ul.toc ul li { 354 | padding: 0; 355 | } 356 | 357 | div.admonition, div.warning { 358 | font-size: 0.9em; 359 | margin: 1em 0 0 0; 360 | border: 1px solid #86989B; 361 | background-color: #f7f7f7; 362 | } 363 | 364 | div.admonition p, div.warning p { 365 | margin: 0.5em 1em 0.5em 1em; 366 | padding: 0; 367 | } 368 | 369 | div.admonition pre, div.warning pre { 370 | margin: 0.4em 1em 0.4em 1em; 371 | } 372 | 373 | div.admonition p.admonition-title, 374 | div.warning p.admonition-title { 375 | margin: 0; 376 | padding: 0.1em 0 0.1em 0.5em; 377 | color: white; 378 | border-bottom: 1px solid #86989B; 379 | font-weight: bold; 380 | background-color: #AFC1C4; 381 | } 382 | 383 | div.warning { 384 | border: 1px solid #940000; 385 | } 386 | 387 | div.warning p.admonition-title { 388 | background-color: #CF0000; 389 | border-bottom-color: #940000; 390 | } 391 | 392 | div.admonition ul, div.admonition ol, 393 | div.warning ul, div.warning ol { 394 | margin: 0.1em 0.5em 0.5em 3em; 395 | padding: 0; 396 | } 397 | 398 | div.versioninfo { 399 | margin: 1em 0 0 0; 400 | border: 1px solid #ccc; 401 | background-color: #DDEAF0; 402 | padding: 8px; 403 | line-height: 1.3em; 404 | font-size: 0.9em; 405 | } 406 | 407 | 408 | a.headerlink { 409 | color: #c60f0f!important; 410 | font-size: 1em; 411 | margin-left: 6px; 412 | padding: 0 4px 0 4px; 413 | text-decoration: none!important; 414 | visibility: hidden; 415 | } 416 | 417 | h1:hover > a.headerlink, 418 | h2:hover > a.headerlink, 419 | h3:hover > a.headerlink, 420 | h4:hover > a.headerlink, 421 | h5:hover > a.headerlink, 422 | h6:hover > a.headerlink, 423 | dt:hover > a.headerlink { 424 | visibility: visible; 425 | } 426 | 427 | a.headerlink:hover { 428 | background-color: #ccc; 429 | color: white!important; 430 | } 431 | 432 | table.indextable td { 433 | text-align: left; 434 | vertical-align: top; 435 | } 436 | 437 | table.indextable dl, table.indextable dd { 438 | margin-top: 0; 439 | margin-bottom: 0; 440 | } 441 | 442 | table.indextable tr.pcap { 443 | height: 10px; 444 | } 445 | 446 | table.indextable tr.cap { 447 | margin-top: 10px; 448 | background-color: #f2f2f2; 449 | } 450 | 451 | img.toggler { 452 | margin-right: 3px; 453 | margin-top: 3px; 454 | cursor: pointer; 455 | } 456 | 457 | img.inheritance { 458 | border: 0px 459 | } 460 | 461 | form.pfform { 462 | margin: 10px 0 20px 0; 463 | } 464 | 465 | table.contentstable { 466 | width: 90%; 467 | } 468 | 469 | table.contentstable p.biglink { 470 | line-height: 150%; 471 | } 472 | 473 | a.biglink { 474 | font-size: 1.3em; 475 | } 476 | 477 | span.linkdescr { 478 | font-style: italic; 479 | padding-top: 5px; 480 | font-size: 90%; 481 | } 482 | 483 | ul.search { 484 | margin: 10px 0 0 20px; 485 | padding: 0; 486 | } 487 | 488 | ul.search li { 489 | padding: 5px 0 5px 20px; 490 | background-image: url(file.png); 491 | background-repeat: no-repeat; 492 | background-position: 0 7px; 493 | } 494 | 495 | ul.search li a { 496 | font-weight: bold; 497 | } 498 | 499 | ul.search li div.context { 500 | color: #888; 501 | margin: 2px 0 0 30px; 502 | text-align: left; 503 | } 504 | 505 | ul.keywordmatches li.goodmatch a { 506 | font-weight: bold; 507 | } 508 | -------------------------------------------------------------------------------- /doc/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /doc/_build/html/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | } 56 | 57 | div.sphinxsidebar ul { 58 | list-style: none; 59 | } 60 | 61 | div.sphinxsidebar ul ul, 62 | div.sphinxsidebar ul.want-points { 63 | margin-left: 20px; 64 | list-style: square; 65 | } 66 | 67 | div.sphinxsidebar ul ul { 68 | margin-top: 0; 69 | margin-bottom: 0; 70 | } 71 | 72 | div.sphinxsidebar form { 73 | margin-top: 10px; 74 | } 75 | 76 | div.sphinxsidebar input { 77 | border: 1px solid #98dbcc; 78 | font-family: sans-serif; 79 | font-size: 1em; 80 | } 81 | 82 | div.sphinxsidebar #searchbox input[type="text"] { 83 | width: 170px; 84 | } 85 | 86 | div.sphinxsidebar #searchbox input[type="submit"] { 87 | width: 30px; 88 | } 89 | 90 | img { 91 | border: 0; 92 | max-width: 100%; 93 | } 94 | 95 | /* -- search page ----------------------------------------------------------- */ 96 | 97 | ul.search { 98 | margin: 10px 0 0 20px; 99 | padding: 0; 100 | } 101 | 102 | ul.search li { 103 | padding: 5px 0 5px 20px; 104 | background-image: url(file.png); 105 | background-repeat: no-repeat; 106 | background-position: 0 7px; 107 | } 108 | 109 | ul.search li a { 110 | font-weight: bold; 111 | } 112 | 113 | ul.search li div.context { 114 | color: #888; 115 | margin: 2px 0 0 30px; 116 | text-align: left; 117 | } 118 | 119 | ul.keywordmatches li.goodmatch a { 120 | font-weight: bold; 121 | } 122 | 123 | /* -- index page ------------------------------------------------------------ */ 124 | 125 | table.contentstable { 126 | width: 90%; 127 | } 128 | 129 | table.contentstable p.biglink { 130 | line-height: 150%; 131 | } 132 | 133 | a.biglink { 134 | font-size: 1.3em; 135 | } 136 | 137 | span.linkdescr { 138 | font-style: italic; 139 | padding-top: 5px; 140 | font-size: 90%; 141 | } 142 | 143 | /* -- general index --------------------------------------------------------- */ 144 | 145 | table.indextable { 146 | width: 100%; 147 | } 148 | 149 | table.indextable td { 150 | text-align: left; 151 | vertical-align: top; 152 | } 153 | 154 | table.indextable dl, table.indextable dd { 155 | margin-top: 0; 156 | margin-bottom: 0; 157 | } 158 | 159 | table.indextable tr.pcap { 160 | height: 10px; 161 | } 162 | 163 | table.indextable tr.cap { 164 | margin-top: 10px; 165 | background-color: #f2f2f2; 166 | } 167 | 168 | img.toggler { 169 | margin-right: 3px; 170 | margin-top: 3px; 171 | cursor: pointer; 172 | } 173 | 174 | div.modindex-jumpbox { 175 | border-top: 1px solid #ddd; 176 | border-bottom: 1px solid #ddd; 177 | margin: 1em 0 1em 0; 178 | padding: 0.4em; 179 | } 180 | 181 | div.genindex-jumpbox { 182 | border-top: 1px solid #ddd; 183 | border-bottom: 1px solid #ddd; 184 | margin: 1em 0 1em 0; 185 | padding: 0.4em; 186 | } 187 | 188 | /* -- general body styles --------------------------------------------------- */ 189 | 190 | a.headerlink { 191 | visibility: hidden; 192 | } 193 | 194 | h1:hover > a.headerlink, 195 | h2:hover > a.headerlink, 196 | h3:hover > a.headerlink, 197 | h4:hover > a.headerlink, 198 | h5:hover > a.headerlink, 199 | h6:hover > a.headerlink, 200 | dt:hover > a.headerlink { 201 | visibility: visible; 202 | } 203 | 204 | div.body p.caption { 205 | text-align: inherit; 206 | } 207 | 208 | div.body td { 209 | text-align: left; 210 | } 211 | 212 | .field-list ul { 213 | padding-left: 1em; 214 | } 215 | 216 | .first { 217 | margin-top: 0 !important; 218 | } 219 | 220 | p.rubric { 221 | margin-top: 30px; 222 | font-weight: bold; 223 | } 224 | 225 | img.align-left, .figure.align-left, object.align-left { 226 | clear: left; 227 | float: left; 228 | margin-right: 1em; 229 | } 230 | 231 | img.align-right, .figure.align-right, object.align-right { 232 | clear: right; 233 | float: right; 234 | margin-left: 1em; 235 | } 236 | 237 | img.align-center, .figure.align-center, object.align-center { 238 | display: block; 239 | margin-left: auto; 240 | margin-right: auto; 241 | } 242 | 243 | .align-left { 244 | text-align: left; 245 | } 246 | 247 | .align-center { 248 | text-align: center; 249 | } 250 | 251 | .align-right { 252 | text-align: right; 253 | } 254 | 255 | /* -- sidebars -------------------------------------------------------------- */ 256 | 257 | div.sidebar { 258 | margin: 0 0 0.5em 1em; 259 | border: 1px solid #ddb; 260 | padding: 7px 7px 0 7px; 261 | background-color: #ffe; 262 | width: 40%; 263 | float: right; 264 | } 265 | 266 | p.sidebar-title { 267 | font-weight: bold; 268 | } 269 | 270 | /* -- topics ---------------------------------------------------------------- */ 271 | 272 | div.topic { 273 | border: 1px solid #ccc; 274 | padding: 7px 7px 0 7px; 275 | margin: 10px 0 10px 0; 276 | } 277 | 278 | p.topic-title { 279 | font-size: 1.1em; 280 | font-weight: bold; 281 | margin-top: 10px; 282 | } 283 | 284 | /* -- admonitions ----------------------------------------------------------- */ 285 | 286 | div.admonition { 287 | margin-top: 10px; 288 | margin-bottom: 10px; 289 | padding: 7px; 290 | } 291 | 292 | div.admonition dt { 293 | font-weight: bold; 294 | } 295 | 296 | div.admonition dl { 297 | margin-bottom: 0; 298 | } 299 | 300 | p.admonition-title { 301 | margin: 0px 10px 5px 0px; 302 | font-weight: bold; 303 | } 304 | 305 | div.body p.centered { 306 | text-align: center; 307 | margin-top: 25px; 308 | } 309 | 310 | /* -- tables ---------------------------------------------------------------- */ 311 | 312 | table.docutils { 313 | border: 0; 314 | border-collapse: collapse; 315 | } 316 | 317 | table.docutils td, table.docutils th { 318 | padding: 1px 8px 1px 5px; 319 | border-top: 0; 320 | border-left: 0; 321 | border-right: 0; 322 | border-bottom: 1px solid #aaa; 323 | } 324 | 325 | table.field-list td, table.field-list th { 326 | border: 0 !important; 327 | } 328 | 329 | table.footnote td, table.footnote th { 330 | border: 0 !important; 331 | } 332 | 333 | th { 334 | text-align: left; 335 | padding-right: 5px; 336 | } 337 | 338 | table.citation { 339 | border-left: solid 1px gray; 340 | margin-left: 1px; 341 | } 342 | 343 | table.citation td { 344 | border-bottom: none; 345 | } 346 | 347 | /* -- other body styles ----------------------------------------------------- */ 348 | 349 | ol.arabic { 350 | list-style: decimal; 351 | } 352 | 353 | ol.loweralpha { 354 | list-style: lower-alpha; 355 | } 356 | 357 | ol.upperalpha { 358 | list-style: upper-alpha; 359 | } 360 | 361 | ol.lowerroman { 362 | list-style: lower-roman; 363 | } 364 | 365 | ol.upperroman { 366 | list-style: upper-roman; 367 | } 368 | 369 | dl { 370 | margin-bottom: 15px; 371 | } 372 | 373 | dd p { 374 | margin-top: 0px; 375 | } 376 | 377 | dd ul, dd table { 378 | margin-bottom: 10px; 379 | } 380 | 381 | dd { 382 | margin-top: 3px; 383 | margin-bottom: 10px; 384 | margin-left: 30px; 385 | } 386 | 387 | dt:target, .highlighted { 388 | background-color: #fbe54e; 389 | } 390 | 391 | dl.glossary dt { 392 | font-weight: bold; 393 | font-size: 1.1em; 394 | } 395 | 396 | .field-list ul { 397 | margin: 0; 398 | padding-left: 1em; 399 | } 400 | 401 | .field-list p { 402 | margin: 0; 403 | } 404 | 405 | .optional { 406 | font-size: 1.3em; 407 | } 408 | 409 | .versionmodified { 410 | font-style: italic; 411 | } 412 | 413 | .system-message { 414 | background-color: #fda; 415 | padding: 5px; 416 | border: 3px solid red; 417 | } 418 | 419 | .footnote:target { 420 | background-color: #ffa; 421 | } 422 | 423 | .line-block { 424 | display: block; 425 | margin-top: 1em; 426 | margin-bottom: 1em; 427 | } 428 | 429 | .line-block .line-block { 430 | margin-top: 0; 431 | margin-bottom: 0; 432 | margin-left: 1.5em; 433 | } 434 | 435 | .guilabel, .menuselection { 436 | font-family: sans-serif; 437 | } 438 | 439 | .accelerator { 440 | text-decoration: underline; 441 | } 442 | 443 | .classifier { 444 | font-style: oblique; 445 | } 446 | 447 | abbr, acronym { 448 | border-bottom: dotted 1px; 449 | cursor: help; 450 | } 451 | 452 | /* -- code displays --------------------------------------------------------- */ 453 | 454 | pre { 455 | overflow: auto; 456 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 457 | } 458 | 459 | td.linenos pre { 460 | padding: 5px 0px; 461 | border: 0; 462 | background-color: transparent; 463 | color: #aaa; 464 | } 465 | 466 | table.highlighttable { 467 | margin-left: 0.5em; 468 | } 469 | 470 | table.highlighttable td { 471 | padding: 0 0.5em 0 0.5em; 472 | } 473 | 474 | tt.descname { 475 | background-color: transparent; 476 | font-weight: bold; 477 | font-size: 1.2em; 478 | } 479 | 480 | tt.descclassname { 481 | background-color: transparent; 482 | } 483 | 484 | tt.xref, a tt { 485 | background-color: transparent; 486 | font-weight: bold; 487 | } 488 | 489 | h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { 490 | background-color: transparent; 491 | } 492 | 493 | .viewcode-link { 494 | float: right; 495 | } 496 | 497 | .viewcode-back { 498 | float: right; 499 | font-family: sans-serif; 500 | } 501 | 502 | div.viewcode-block:target { 503 | margin: -1px -10px; 504 | padding: 0 10px; 505 | } 506 | 507 | /* -- math display ---------------------------------------------------------- */ 508 | 509 | img.math { 510 | vertical-align: middle; 511 | } 512 | 513 | div.body div.math p { 514 | text-align: center; 515 | } 516 | 517 | span.eqno { 518 | float: right; 519 | } 520 | 521 | /* -- printout stylesheet --------------------------------------------------- */ 522 | 523 | @media print { 524 | div.document, 525 | div.documentwrapper, 526 | div.bodywrapper { 527 | margin: 0 !important; 528 | width: 100%; 529 | } 530 | 531 | div.sphinxsidebar, 532 | div.related, 533 | div.footer, 534 | #top-link { 535 | display: none; 536 | } 537 | } -------------------------------------------------------------------------------- /doc/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /doc/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /doc/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/comment.png -------------------------------------------------------------------------------- /doc/_build/html/_static/contents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/contents.png -------------------------------------------------------------------------------- /doc/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node) { 70 | if (node.nodeType == 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 74 | var span = document.createElement("span"); 75 | span.className = className; 76 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 78 | document.createTextNode(val.substr(pos + text.length)), 79 | node.nextSibling)); 80 | node.nodeValue = val.substr(0, pos); 81 | } 82 | } 83 | else if (!jQuery(node).is("button, select, textarea")) { 84 | jQuery.each(node.childNodes, function() { 85 | highlight(this); 86 | }); 87 | } 88 | } 89 | return this.each(function() { 90 | highlight(this); 91 | }); 92 | }; 93 | 94 | /** 95 | * Small JavaScript module for the documentation. 96 | */ 97 | var Documentation = { 98 | 99 | init : function() { 100 | this.fixFirefoxAnchorBug(); 101 | this.highlightSearchWords(); 102 | this.initIndexTable(); 103 | }, 104 | 105 | /** 106 | * i18n support 107 | */ 108 | TRANSLATIONS : {}, 109 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 110 | LOCALE : 'unknown', 111 | 112 | // gettext and ngettext don't access this so that the functions 113 | // can safely bound to a different name (_ = Documentation.gettext) 114 | gettext : function(string) { 115 | var translated = Documentation.TRANSLATIONS[string]; 116 | if (typeof translated == 'undefined') 117 | return string; 118 | return (typeof translated == 'string') ? translated : translated[0]; 119 | }, 120 | 121 | ngettext : function(singular, plural, n) { 122 | var translated = Documentation.TRANSLATIONS[singular]; 123 | if (typeof translated == 'undefined') 124 | return (n == 1) ? singular : plural; 125 | return translated[Documentation.PLURALEXPR(n)]; 126 | }, 127 | 128 | addTranslations : function(catalog) { 129 | for (var key in catalog.messages) 130 | this.TRANSLATIONS[key] = catalog.messages[key]; 131 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 132 | this.LOCALE = catalog.locale; 133 | }, 134 | 135 | /** 136 | * add context elements like header anchor links 137 | */ 138 | addContextElements : function() { 139 | $('div[id] > :header:first').each(function() { 140 | $('\u00B6'). 141 | attr('href', '#' + this.id). 142 | attr('title', _('Permalink to this headline')). 143 | appendTo(this); 144 | }); 145 | $('dt[id]').each(function() { 146 | $('\u00B6'). 147 | attr('href', '#' + this.id). 148 | attr('title', _('Permalink to this definition')). 149 | appendTo(this); 150 | }); 151 | }, 152 | 153 | /** 154 | * workaround a firefox stupidity 155 | */ 156 | fixFirefoxAnchorBug : function() { 157 | if (document.location.hash && $.browser.mozilla) 158 | window.setTimeout(function() { 159 | document.location.href += ''; 160 | }, 10); 161 | }, 162 | 163 | /** 164 | * highlight the search words provided in the url in the text 165 | */ 166 | highlightSearchWords : function() { 167 | var params = $.getQueryParameters(); 168 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 169 | if (terms.length) { 170 | var body = $('div.body'); 171 | if (!body.length) { 172 | body = $('body'); 173 | } 174 | window.setTimeout(function() { 175 | $.each(terms, function() { 176 | body.highlightText(this.toLowerCase(), 'highlighted'); 177 | }); 178 | }, 10); 179 | $('') 181 | .appendTo($('#searchbox')); 182 | } 183 | }, 184 | 185 | /** 186 | * init the domain index toggle buttons 187 | */ 188 | initIndexTable : function() { 189 | var togglers = $('img.toggler').click(function() { 190 | var src = $(this).attr('src'); 191 | var idnum = $(this).attr('id').substr(7); 192 | $('tr.cg-' + idnum).toggle(); 193 | if (src.substr(-9) == 'minus.png') 194 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 195 | else 196 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 197 | }).css('display', ''); 198 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 199 | togglers.click(); 200 | } 201 | }, 202 | 203 | /** 204 | * helper function to hide the search marks again 205 | */ 206 | hideSearchWords : function() { 207 | $('#searchbox .highlight-link').fadeOut(300); 208 | $('span.highlighted').removeClass('highlighted'); 209 | }, 210 | 211 | /** 212 | * make the url absolute 213 | */ 214 | makeURL : function(relativeURL) { 215 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 216 | }, 217 | 218 | /** 219 | * get the current relative url 220 | */ 221 | getCurrentURL : function() { 222 | var path = document.location.pathname; 223 | var parts = path.split(/\//); 224 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 225 | if (this == '..') 226 | parts.pop(); 227 | }); 228 | var url = parts.join('/'); 229 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 230 | } 231 | }; 232 | 233 | // quick alias for translations 234 | _ = Documentation.gettext; 235 | 236 | $(document).ready(function() { 237 | Documentation.init(); 238 | }); 239 | -------------------------------------------------------------------------------- /doc/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /doc/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/down.png -------------------------------------------------------------------------------- /doc/_build/html/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/favicon.ico -------------------------------------------------------------------------------- /doc/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/file.png -------------------------------------------------------------------------------- /doc/_build/html/_static/lhs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/lhs.png -------------------------------------------------------------------------------- /doc/_build/html/_static/lhs_custom_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/lhs_custom_distribution.png -------------------------------------------------------------------------------- /doc/_build/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/logo.png -------------------------------------------------------------------------------- /doc/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/minus.png -------------------------------------------------------------------------------- /doc/_build/html/_static/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/navigation.png -------------------------------------------------------------------------------- /doc/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/plus.png -------------------------------------------------------------------------------- /doc/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #333333 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /doc/_build/html/_static/sphinxdoc.css: -------------------------------------------------------------------------------- 1 | /* 2 | * sphinxdoc.css_t 3 | * ~~~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- sphinxdoc theme. Originally created by 6 | * Armin Ronacher for Werkzeug. 7 | * 8 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | @import url("basic.css"); 14 | 15 | /* -- page layout ----------------------------------------------------------- */ 16 | 17 | body { 18 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 19 | 'Verdana', sans-serif; 20 | font-size: 14px; 21 | letter-spacing: -0.01em; 22 | line-height: 150%; 23 | text-align: center; 24 | background-color: #BFD1D4; 25 | color: black; 26 | padding: 0; 27 | border: 1px solid #aaa; 28 | 29 | margin: 0px 80px 0px 80px; 30 | min-width: 740px; 31 | } 32 | 33 | div.document { 34 | background-color: white; 35 | text-align: left; 36 | background-image: url(contents.png); 37 | background-repeat: repeat-x; 38 | } 39 | 40 | div.bodywrapper { 41 | margin: 0 240px 0 0; 42 | border-right: 1px solid #ccc; 43 | } 44 | 45 | div.body { 46 | margin: 0; 47 | padding: 0.5em 20px 20px 20px; 48 | } 49 | 50 | div.related { 51 | font-size: 1em; 52 | } 53 | 54 | div.related ul { 55 | background-image: url(navigation.png); 56 | height: 2em; 57 | border-top: 1px solid #ddd; 58 | border-bottom: 1px solid #ddd; 59 | } 60 | 61 | div.related ul li { 62 | margin: 0; 63 | padding: 0; 64 | height: 2em; 65 | float: left; 66 | } 67 | 68 | div.related ul li.right { 69 | float: right; 70 | margin-right: 5px; 71 | } 72 | 73 | div.related ul li a { 74 | margin: 0; 75 | padding: 0 5px 0 5px; 76 | line-height: 1.75em; 77 | color: #EE9816; 78 | } 79 | 80 | div.related ul li a:hover { 81 | color: #3CA8E7; 82 | } 83 | 84 | div.sphinxsidebarwrapper { 85 | padding: 0; 86 | } 87 | 88 | div.sphinxsidebar { 89 | margin: 0; 90 | padding: 0.5em 15px 15px 0; 91 | width: 210px; 92 | float: right; 93 | font-size: 1em; 94 | text-align: left; 95 | } 96 | 97 | div.sphinxsidebar h3, div.sphinxsidebar h4 { 98 | margin: 1em 0 0.5em 0; 99 | font-size: 1em; 100 | padding: 0.1em 0 0.1em 0.5em; 101 | color: white; 102 | border: 1px solid #86989B; 103 | background-color: #AFC1C4; 104 | } 105 | 106 | div.sphinxsidebar h3 a { 107 | color: white; 108 | } 109 | 110 | div.sphinxsidebar ul { 111 | padding-left: 1.5em; 112 | margin-top: 7px; 113 | padding: 0; 114 | line-height: 130%; 115 | } 116 | 117 | div.sphinxsidebar ul ul { 118 | margin-left: 20px; 119 | } 120 | 121 | div.footer { 122 | background-color: #E3EFF1; 123 | color: #86989B; 124 | padding: 3px 8px 3px 0; 125 | clear: both; 126 | font-size: 0.8em; 127 | text-align: right; 128 | } 129 | 130 | div.footer a { 131 | color: #86989B; 132 | text-decoration: underline; 133 | } 134 | 135 | /* -- body styles ----------------------------------------------------------- */ 136 | 137 | p { 138 | margin: 0.8em 0 0.5em 0; 139 | } 140 | 141 | a { 142 | color: #CA7900; 143 | text-decoration: none; 144 | } 145 | 146 | a:hover { 147 | color: #2491CF; 148 | } 149 | 150 | div.body a { 151 | text-decoration: underline; 152 | } 153 | 154 | h1 { 155 | margin: 0; 156 | padding: 0.7em 0 0.3em 0; 157 | font-size: 1.5em; 158 | color: #11557C; 159 | } 160 | 161 | h2 { 162 | margin: 1.3em 0 0.2em 0; 163 | font-size: 1.35em; 164 | padding: 0; 165 | } 166 | 167 | h3 { 168 | margin: 1em 0 -0.3em 0; 169 | font-size: 1.2em; 170 | } 171 | 172 | div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { 173 | color: black!important; 174 | } 175 | 176 | h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { 177 | display: none; 178 | margin: 0 0 0 0.3em; 179 | padding: 0 0.2em 0 0.2em; 180 | color: #aaa!important; 181 | } 182 | 183 | h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, 184 | h5:hover a.anchor, h6:hover a.anchor { 185 | display: inline; 186 | } 187 | 188 | h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, 189 | h5 a.anchor:hover, h6 a.anchor:hover { 190 | color: #777; 191 | background-color: #eee; 192 | } 193 | 194 | a.headerlink { 195 | color: #c60f0f!important; 196 | font-size: 1em; 197 | margin-left: 6px; 198 | padding: 0 4px 0 4px; 199 | text-decoration: none!important; 200 | } 201 | 202 | a.headerlink:hover { 203 | background-color: #ccc; 204 | color: white!important; 205 | } 206 | 207 | cite, code, tt { 208 | font-family: 'Consolas', 'Deja Vu Sans Mono', 209 | 'Bitstream Vera Sans Mono', monospace; 210 | font-size: 0.95em; 211 | letter-spacing: 0.01em; 212 | } 213 | 214 | tt { 215 | background-color: #f2f2f2; 216 | border-bottom: 1px solid #ddd; 217 | color: #333; 218 | } 219 | 220 | tt.descname, tt.descclassname, tt.xref { 221 | border: 0; 222 | } 223 | 224 | hr { 225 | border: 1px solid #abc; 226 | margin: 2em; 227 | } 228 | 229 | a tt { 230 | border: 0; 231 | color: #CA7900; 232 | } 233 | 234 | a tt:hover { 235 | color: #2491CF; 236 | } 237 | 238 | pre { 239 | font-family: 'Consolas', 'Deja Vu Sans Mono', 240 | 'Bitstream Vera Sans Mono', monospace; 241 | font-size: 0.95em; 242 | letter-spacing: 0.015em; 243 | line-height: 120%; 244 | padding: 0.5em; 245 | border: 1px solid #ccc; 246 | background-color: #f8f8f8; 247 | } 248 | 249 | pre a { 250 | color: inherit; 251 | text-decoration: underline; 252 | } 253 | 254 | td.linenos pre { 255 | padding: 0.5em 0; 256 | } 257 | 258 | div.quotebar { 259 | background-color: #f8f8f8; 260 | max-width: 250px; 261 | float: right; 262 | padding: 2px 7px; 263 | border: 1px solid #ccc; 264 | } 265 | 266 | div.topic { 267 | background-color: #f8f8f8; 268 | } 269 | 270 | table { 271 | border-collapse: collapse; 272 | margin: 0 -0.5em 0 -0.5em; 273 | } 274 | 275 | table td, table th { 276 | padding: 0.2em 0.5em 0.2em 0.5em; 277 | } 278 | 279 | div.admonition, div.warning { 280 | font-size: 0.9em; 281 | margin: 1em 0 1em 0; 282 | border: 1px solid #86989B; 283 | background-color: #f7f7f7; 284 | padding: 0; 285 | } 286 | 287 | div.admonition p, div.warning p { 288 | margin: 0.5em 1em 0.5em 1em; 289 | padding: 0; 290 | } 291 | 292 | div.admonition pre, div.warning pre { 293 | margin: 0.4em 1em 0.4em 1em; 294 | } 295 | 296 | div.admonition p.admonition-title, 297 | div.warning p.admonition-title { 298 | margin: 0; 299 | padding: 0.1em 0 0.1em 0.5em; 300 | color: white; 301 | border-bottom: 1px solid #86989B; 302 | font-weight: bold; 303 | background-color: #AFC1C4; 304 | } 305 | 306 | div.warning { 307 | border: 1px solid #940000; 308 | } 309 | 310 | div.warning p.admonition-title { 311 | background-color: #CF0000; 312 | border-bottom-color: #940000; 313 | } 314 | 315 | div.admonition ul, div.admonition ol, 316 | div.warning ul, div.warning ol { 317 | margin: 0.1em 0.5em 0.5em 3em; 318 | padding: 0; 319 | } 320 | 321 | div.versioninfo { 322 | margin: 1em 0 0 0; 323 | border: 1px solid #ccc; 324 | background-color: #DDEAF0; 325 | padding: 8px; 326 | line-height: 1.3em; 327 | font-size: 0.9em; 328 | } 329 | 330 | .viewcode-back { 331 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 332 | 'Verdana', sans-serif; 333 | } 334 | 335 | div.viewcode-block:target { 336 | background-color: #f4debf; 337 | border-top: 1px solid #ac9; 338 | border-bottom: 1px solid #ac9; 339 | } -------------------------------------------------------------------------------- /doc/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /doc/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/_static/up.png -------------------------------------------------------------------------------- /doc/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — pyDOE 0.3.6 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | ad 34 |
35 | 36 | 52 | 53 | 54 | 55 |
56 |
57 |

Table of contents

58 | 64 | 65 | 66 | 67 | 68 | 80 | 81 |

Documentation license

82 | Creative Commons License 83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 | 91 | 92 |

Index

93 | 94 |
95 | Symbols 96 | | B 97 | | C 98 | | F 99 | | G 100 | | I 101 | | L 102 | | P 103 | | R 104 | | S 105 | 106 |
107 |

Symbols

108 | 109 | 115 | 121 |
110 | 111 |
2-Level Fractional Factorial 112 |
113 | 114 |
116 | 117 |
2-Level Full Factorial 118 |
119 | 120 |
122 | 123 |

B

124 | 125 | 131 |
126 | 127 |
Box-Behnken 128 |
129 | 130 |
132 | 133 |

C

134 | 135 | 141 |
136 | 137 |
Central Composite 138 |
139 | 140 |
142 | 143 |

F

144 | 145 | 151 |
146 | 147 |
Factorial Designs Support 148 |
149 | 150 |
152 | 153 |

G

154 | 155 | 161 |
156 | 157 |
General Full-Factorial 158 |
159 | 160 |
162 | 163 |

I

164 | 165 | 171 |
166 | 167 |
installation 168 |
169 | 170 |
172 | 173 |

L

174 | 175 | 181 | 187 |
176 | 177 |
Latin-Hypercube 178 |
179 | 180 |
182 | 183 |
Latin-Hypercube Designs Support 184 |
185 | 186 |
188 | 189 |

P

190 | 191 | 197 |
192 | 193 |
Plackett-Burman 194 |
195 | 196 |
198 | 199 |

R

200 | 201 | 211 | 221 |
202 | 203 |
Randomized Designs 204 |
205 | 206 | 207 |
Response Surface Designs 208 |
209 | 210 |
212 | 213 |
Response Surface Designs Support 214 |
215 | 216 | 217 |
RSM 218 |
219 | 220 |
222 | 223 |

S

224 | 225 | 231 |
226 | 227 |
support 228 |
229 | 230 |
232 | 233 | 234 | 235 |
236 |
237 |
238 |
239 |
240 | 256 | 260 | 261 | -------------------------------------------------------------------------------- /doc/_build/html/index_TOC.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Table of Contents — pyDOE 0.3.6 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | ad 34 |
35 | 36 | 55 | 56 | 57 | 58 |
59 |
60 |

Table of contents

61 | 67 | 68 | 80 | 81 |

Documentation license

82 | Creative Commons License 83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 | 91 |
92 |

Table of Contents

93 | 101 |
102 | 103 | 104 |
105 |
106 |
107 |
108 |
109 | 128 | 132 | 133 | -------------------------------------------------------------------------------- /doc/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_build/html/objects.inv -------------------------------------------------------------------------------- /doc/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — pyDOE 0.3.6 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | ad 41 |
42 | 43 | 59 | 60 | 61 | 62 |
63 |
64 |

Table of contents

65 | 71 | 72 |

Documentation license

73 | Creative Commons License 74 |
75 |
76 | 77 |
78 |
79 |
80 |
81 | 82 |

Search

83 |
84 | 85 |

86 | Please activate JavaScript to enable the search 87 | functionality. 88 |

89 |
90 |

91 | From here you can search these documents. Enter your search 92 | words into the box below and click "search". Note that the search 93 | function will automatically search for all of the words. Pages 94 | containing fewer words won't appear in the result list. 95 |

96 |
97 | 98 | 99 | 100 |
101 | 102 |
103 | 104 |
105 | 106 |
107 |
108 |
109 |
110 |
111 | 127 | 131 | 132 | -------------------------------------------------------------------------------- /doc/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:42,terms:{all:[0,1,3,4],edg:1,chain:0,four:[0,4],prefix:1,correl:3,follow:[0,1,3,4],row:0,decid:0,orthogon:[4,3],unpack:1,articl:[0,4,3],deviat:3,swap:0,under:1,sent:1,suitabl:4,everi:0,string:[0,3],util:[0,1],implicitli:0,cmd:1,michael:1,iter:3,"try":1,item:[0,1],maximin:3,pleas:[0,4,3],fold:0,zero:3,stdv:3,blue:3,index:1,abc:0,section:[0,4,3],uniform:3,access:[0,1,3,4],version:1,method:3,can:[0,1,3,4],coeffici:3,sophist:0,here:3,let:[0,3],sinc:0,valu:4,box:1,trial:0,typic:0,love:1,appli:[0,3],approxim:4,ask:1,unix:1,from:[0,1,3,4],describ:[0,4,3],would:[0,3],upgrad:0,next:0,websit:[0,1,3,4],program:1,pydo:0,taken:0,tell:[0,3],desir:0,afford:0,relat:0,iii:0,none:3,graphic:3,alia:0,setup:1,work:[1,3],uniqu:0,archiv:1,whatev:0,sudo:1,indic:0,minimum:3,want:[0,3],alwai:0,surfac:[1,2],end:0,anoth:0,how:[0,4,3],criterion:3,simpl:[0,1,3,4],product:0,max:0,after:[0,1,3,4],befor:0,mac:1,mai:1,multipl:0,varianc:4,lhd:3,third:0,minim:3,correspond:1,green:3,allow:0,order:0,oper:0,least:4,composit:1,help:[1,4],move:1,approv:1,increas:[0,3],scientist:1,through:[0,1],flexibl:0,thank:1,chosen:1,fix:[0,4,3],sourcetre:1,better:0,window:1,main:0,might:1,them:0,scipi:[1,3],cea:1,handl:0,inria:1,"break":0,now:[0,3],term:0,separ:0,each:[0,3],found:1,side:0,mean:[0,3],individu:1,procedur:1,happen:0,variabl:[4,3],shown:3,matrix:0,space:[0,3],goe:1,publish:1,adapt:1,matric:[0,1,3,4],earlier:1,insid:1,situat:4,standard:3,reason:0,hypercub:1,org:1,bleed:1,bbdesign:1,care:0,wai:0,success:1,place:3,isn:4,first:0,origin:1,rang:3,question:[0,1,3,4],arrai:[0,4,3],number:[0,1,3,4],done:0,wrapper:0,open:1,given:4,circumscrib:4,script:1,interact:0,system:1,construct:1,cumul:3,master:1,tune:3,statement:[0,1,3,4],termin:1,conveni:0,store:1,shell:1,option:4,setuptool:1,specifi:[0,4],github:1,consult:[0,4,3],than:0,my_directori:1,kind:[0,4,3],keyword:[0,4],provid:1,structur:0,charact:0,pre:4,sai:[4,3],comput:4,argument:4,have:[0,1],need:[0,1,3,4],seen:0,engin:1,lib:1,note:0,also:[0,1,3,4],discret:0,which:[1,3,4],cci:4,singl:4,uppercas:0,distribut:1,normal:3,bsd:1,alpha:4,maria:1,renam:1,clear:0,face:4,determin:4,yann:1,usual:0,random:[1,2],syntax:[4,3],anywai:3,feedback:1,current:1,onli:[0,4],locat:[1,3],copyright:1,menu:1,should:[0,1],factor:[0,1,3,4],folder:1,variou:[0,1,3,4],get:0,simplest:4,pypi:1,cannot:4,report:1,gen:0,requir:0,common:0,where:[0,4,3],nist:[0,1,3,4],set:[0,1,3,4],knowledg:0,christopoul:1,see:4,result:0,respons:[1,2],best:1,someth:3,wikipedia:[0,4,3],centermaximin:3,written:0,smallest:0,between:[0,3],"import":0,experi:[0,1,3,4],altern:1,latin:1,ccdesign:1,xrang:3,extens:0,lowercas:0,distinguish:0,addit:1,both:[0,3],howev:3,etc:[0,1,3,4],mani:0,comment:[0,4,3],simpli:[1,3],point:[4,3],overview:2,linux:1,assum:[0,4],marc:1,numpi:1,invers:3,much:1,basic:3,scido:1,muddl:0,baudin:1,resolut:0,ani:[0,1,3,4],those:0,"case":0,ident:0,uncertain:4,look:[0,3],behnken:1,harder:0,defin:0,"while":4,abov:0,confound:0,kwarg:4,quadrat:4,author:[0,1,3,4],same:3,inscrib:4,document:1,higher:0,effect:0,hand:0,user:[0,1,3,4],php:1,expand:0,appropri:[0,1,3,4],center:[4,3],macro:1,thu:0,well:[0,1,3,4],exampl:0,command:1,thi:[0,1,3,4],jean:1,ccf:4,ccc:4,latest:1,distanc:3,just:[0,1],less:0,"2to3":1,obtain:1,systemat:0,web:4,littl:0,input:[0,4],finder:1,like:[0,3],specif:[0,3],integ:[0,3],necessari:1,either:4,output:[0,3],page:4,two:[0,1,4],right:[0,1],interv:3,suppli:0,some:0,maxim:3,sampl:3,librari:1,scale:3,estim:0,condit:0,run:[0,1,3,4],statistician:1,usag:0,corr:3,wealth:[0,1,3,4],about:[0,1,3,4],central:1,column:0,collett:1,block:4,ppf:3,within:3,easy_instal:1,three:0,martinez:1,your:[0,1,4],loc:3,suffici:1,rotat:4,transform:3,custom:1,avail:[0,1,3,4],start:1,includ:[1,4],forward:[0,4,3],"function":[0,1,3],offer:0,forc:0,tupl:4,forg:1,hear:1,"true":0,bug:[0,1,3,4],notat:0,"default":[0,4,3],wish:3,maximum:3,below:[1,3],creat:[0,1,3,4],certain:1,pip:1,fill:3,when:[0,1],detail:[0,1,3,4],other:[0,1],you:[0,1,4],stat:3,claus:1,star:4,symbol:0,norm:3,consid:0,scilab:1,stai:3,reduc:[0,3],directori:1},objtypes:{},objnames:{},filenames:["factorial","index","index_TOC","randomized","rsm"],titles:["Factorial Designs","pyDOE: The experimental design package for python","Table of Contents","Randomized Designs","Response Surface Designs"],objects:{},titleterms:{ff2n:0,code:1,composit:4,plackett:0,random:3,automat:1,packag:1,latin:3,design:[0,1,3,4],tabl:2,download:1,instal:1,fullfact:0,content:2,surfac:4,burman:0,licens:1,contact:1,upgrad:1,custom:3,note:1,python:1,fracfact:0,experiment:1,requir:1,pydo:1,"import":1,factori:0,more:[0,4,3],pbdesign:0,sourc:1,distribut:3,ccdesign:4,gener:0,credit:1,capabl:1,hypercub:3,respons:4,bbdesign:4,box:4,central:4,full:0,level:0,behnken:4,manual:1,fraction:0,exampl:[4,3],statist:3,inform:[0,4,3],refer:1}}) -------------------------------------------------------------------------------- /doc/_static/_default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Alternate Sphinx design 3 | * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl. 4 | */ 5 | 6 | body { 7 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; 8 | font-size: 14px; 9 | letter-spacing: -0.01em; 10 | line-height: 150%; 11 | text-align: center; 12 | /*background-color: #AFC1C4; */ 13 | background-color: #BFD1D4; 14 | color: black; 15 | padding: 0; 16 | border: 1px solid #aaa; 17 | 18 | margin: 0px 80px 0px 80px; 19 | min-width: 740px; 20 | } 21 | 22 | a { 23 | color: #CA7900; 24 | text-decoration: none; 25 | } 26 | 27 | a:hover { 28 | color: #2491CF; 29 | } 30 | 31 | pre { 32 | font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 33 | font-size: 0.95em; 34 | letter-spacing: 0.015em; 35 | padding: 0.5em; 36 | border: 1px solid #ccc; 37 | background-color: #f8f8f8; 38 | } 39 | 40 | td.linenos pre { 41 | padding: 0.5em 0; 42 | border: 0; 43 | background-color: transparent; 44 | color: #aaa; 45 | } 46 | 47 | table.highlighttable { 48 | margin-left: 0.5em; 49 | } 50 | 51 | table.highlighttable td { 52 | padding: 0 0.5em 0 0.5em; 53 | } 54 | 55 | cite, code, tt { 56 | font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 57 | font-size: 0.95em; 58 | letter-spacing: 0.01em; 59 | } 60 | 61 | hr { 62 | border: 1px solid #abc; 63 | margin: 2em; 64 | } 65 | 66 | tt { 67 | background-color: #f2f2f2; 68 | border-bottom: 1px solid #ddd; 69 | color: #333; 70 | } 71 | 72 | tt.descname { 73 | background-color: transparent; 74 | font-weight: bold; 75 | font-size: 1.2em; 76 | border: 0; 77 | } 78 | 79 | tt.descclassname { 80 | background-color: transparent; 81 | border: 0; 82 | } 83 | 84 | tt.xref { 85 | background-color: transparent; 86 | font-weight: bold; 87 | border: 0; 88 | } 89 | 90 | a tt { 91 | background-color: transparent; 92 | font-weight: bold; 93 | border: 0; 94 | color: #CA7900; 95 | } 96 | 97 | a tt:hover { 98 | color: #2491CF; 99 | } 100 | 101 | dl { 102 | margin-bottom: 15px; 103 | } 104 | 105 | dd p { 106 | margin-top: 0px; 107 | } 108 | 109 | dd ul, dd table { 110 | margin-bottom: 10px; 111 | } 112 | 113 | dd { 114 | margin-top: 3px; 115 | margin-bottom: 10px; 116 | margin-left: 30px; 117 | } 118 | 119 | .refcount { 120 | color: #060; 121 | } 122 | 123 | dt:target, 124 | .highlight { 125 | background-color: #fbe54e; 126 | } 127 | 128 | dl.class, dl.function { 129 | border-top: 2px solid #888; 130 | } 131 | 132 | dl.method, dl.attribute { 133 | border-top: 1px solid #aaa; 134 | } 135 | 136 | dl.glossary dt { 137 | font-weight: bold; 138 | font-size: 1.1em; 139 | } 140 | 141 | pre { 142 | line-height: 120%; 143 | } 144 | 145 | pre a { 146 | color: inherit; 147 | text-decoration: underline; 148 | } 149 | 150 | .first { 151 | margin-top: 0 !important; 152 | } 153 | 154 | div.document { 155 | background-color: white; 156 | text-align: left; 157 | background-image: url(contents.png); 158 | background-repeat: repeat-x; 159 | } 160 | 161 | /* 162 | div.documentwrapper { 163 | width: 100%; 164 | } 165 | */ 166 | 167 | div.clearer { 168 | clear: both; 169 | } 170 | 171 | div.related h3 { 172 | display: none; 173 | } 174 | 175 | div.related ul { 176 | background-image: url(navigation.png); 177 | height: 2em; 178 | list-style: none; 179 | border-top: 1px solid #ddd; 180 | border-bottom: 1px solid #ddd; 181 | margin: 0; 182 | padding-left: 10px; 183 | } 184 | 185 | div.related ul li { 186 | margin: 0; 187 | padding: 0; 188 | height: 2em; 189 | float: left; 190 | } 191 | 192 | div.related ul li.right { 193 | float: right; 194 | margin-right: 5px; 195 | } 196 | 197 | div.related ul li a { 198 | margin: 0; 199 | padding: 0 5px 0 5px; 200 | line-height: 1.75em; 201 | color: #EE9816; 202 | } 203 | 204 | div.related ul li a:hover { 205 | color: #3CA8E7; 206 | } 207 | 208 | div.body { 209 | margin: 0; 210 | padding: 0.5em 20px 20px 20px; 211 | } 212 | 213 | div.bodywrapper { 214 | margin: 0 240px 0 0; 215 | border-right: 1px solid #ccc; 216 | } 217 | 218 | div.body a { 219 | text-decoration: underline; 220 | } 221 | 222 | div.sphinxsidebar { 223 | margin: 0; 224 | padding: 0.5em 15px 15px 0; 225 | width: 210px; 226 | float: right; 227 | text-align: left; 228 | /* margin-left: -100%; */ 229 | } 230 | 231 | div.sphinxsidebar h4, div.sphinxsidebar h3 { 232 | margin: 1em 0 0.5em 0; 233 | font-size: 0.9em; 234 | padding: 0.1em 0 0.1em 0.5em; 235 | color: white; 236 | border: 1px solid #86989B; 237 | background-color: #AFC1C4; 238 | } 239 | 240 | div.sphinxsidebar ul { 241 | padding-left: 1.5em; 242 | margin-top: 7px; 243 | list-style: none; 244 | padding: 0; 245 | line-height: 130%; 246 | } 247 | 248 | div.sphinxsidebar ul ul { 249 | list-style: square; 250 | margin-left: 20px; 251 | } 252 | 253 | p { 254 | margin: 0.8em 0 0.5em 0; 255 | } 256 | 257 | p.rubric { 258 | font-weight: bold; 259 | } 260 | 261 | h1 { 262 | margin: 0; 263 | padding: 0.7em 0 0.3em 0; 264 | font-size: 1.5em; 265 | color: #11557C; 266 | } 267 | 268 | h2 { 269 | margin: 1.3em 0 0.2em 0; 270 | font-size: 1.35em; 271 | padding: 0; 272 | } 273 | 274 | h3 { 275 | margin: 1em 0 -0.3em 0; 276 | font-size: 1.2em; 277 | } 278 | 279 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { 280 | color: black!important; 281 | } 282 | 283 | h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { 284 | display: none; 285 | margin: 0 0 0 0.3em; 286 | padding: 0 0.2em 0 0.2em; 287 | color: #aaa!important; 288 | } 289 | 290 | h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, 291 | h5:hover a.anchor, h6:hover a.anchor { 292 | display: inline; 293 | } 294 | 295 | h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, 296 | h5 a.anchor:hover, h6 a.anchor:hover { 297 | color: #777; 298 | background-color: #eee; 299 | } 300 | 301 | table { 302 | border-collapse: collapse; 303 | margin: 0 -0.5em 0 -0.5em; 304 | } 305 | 306 | table td, table th { 307 | padding: 0.2em 0.5em 0.2em 0.5em; 308 | } 309 | 310 | div.footer { 311 | background-color: #E3EFF1; 312 | color: #86989B; 313 | padding: 3px 8px 3px 0; 314 | clear: both; 315 | font-size: 0.8em; 316 | text-align: right; 317 | } 318 | 319 | div.footer a { 320 | color: #86989B; 321 | text-decoration: underline; 322 | } 323 | 324 | div.pagination { 325 | margin-top: 2em; 326 | padding-top: 0.5em; 327 | border-top: 1px solid black; 328 | text-align: center; 329 | } 330 | 331 | div.sphinxsidebar ul.toc { 332 | margin: 1em 0 1em 0; 333 | padding: 0 0 0 0.5em; 334 | list-style: none; 335 | } 336 | 337 | div.sphinxsidebar ul.toc li { 338 | margin: 0.5em 0 0.5em 0; 339 | font-size: 0.9em; 340 | line-height: 130%; 341 | } 342 | 343 | div.sphinxsidebar ul.toc li p { 344 | margin: 0; 345 | padding: 0; 346 | } 347 | 348 | div.sphinxsidebar ul.toc ul { 349 | margin: 0.2em 0 0.2em 0; 350 | padding: 0 0 0 1.8em; 351 | } 352 | 353 | div.sphinxsidebar ul.toc ul li { 354 | padding: 0; 355 | } 356 | 357 | div.admonition, div.warning { 358 | font-size: 0.9em; 359 | margin: 1em 0 0 0; 360 | border: 1px solid #86989B; 361 | background-color: #f7f7f7; 362 | } 363 | 364 | div.admonition p, div.warning p { 365 | margin: 0.5em 1em 0.5em 1em; 366 | padding: 0; 367 | } 368 | 369 | div.admonition pre, div.warning pre { 370 | margin: 0.4em 1em 0.4em 1em; 371 | } 372 | 373 | div.admonition p.admonition-title, 374 | div.warning p.admonition-title { 375 | margin: 0; 376 | padding: 0.1em 0 0.1em 0.5em; 377 | color: white; 378 | border-bottom: 1px solid #86989B; 379 | font-weight: bold; 380 | background-color: #AFC1C4; 381 | } 382 | 383 | div.warning { 384 | border: 1px solid #940000; 385 | } 386 | 387 | div.warning p.admonition-title { 388 | background-color: #CF0000; 389 | border-bottom-color: #940000; 390 | } 391 | 392 | div.admonition ul, div.admonition ol, 393 | div.warning ul, div.warning ol { 394 | margin: 0.1em 0.5em 0.5em 3em; 395 | padding: 0; 396 | } 397 | 398 | div.versioninfo { 399 | margin: 1em 0 0 0; 400 | border: 1px solid #ccc; 401 | background-color: #DDEAF0; 402 | padding: 8px; 403 | line-height: 1.3em; 404 | font-size: 0.9em; 405 | } 406 | 407 | 408 | a.headerlink { 409 | color: #c60f0f!important; 410 | font-size: 1em; 411 | margin-left: 6px; 412 | padding: 0 4px 0 4px; 413 | text-decoration: none!important; 414 | visibility: hidden; 415 | } 416 | 417 | h1:hover > a.headerlink, 418 | h2:hover > a.headerlink, 419 | h3:hover > a.headerlink, 420 | h4:hover > a.headerlink, 421 | h5:hover > a.headerlink, 422 | h6:hover > a.headerlink, 423 | dt:hover > a.headerlink { 424 | visibility: visible; 425 | } 426 | 427 | a.headerlink:hover { 428 | background-color: #ccc; 429 | color: white!important; 430 | } 431 | 432 | table.indextable td { 433 | text-align: left; 434 | vertical-align: top; 435 | } 436 | 437 | table.indextable dl, table.indextable dd { 438 | margin-top: 0; 439 | margin-bottom: 0; 440 | } 441 | 442 | table.indextable tr.pcap { 443 | height: 10px; 444 | } 445 | 446 | table.indextable tr.cap { 447 | margin-top: 10px; 448 | background-color: #f2f2f2; 449 | } 450 | 451 | img.toggler { 452 | margin-right: 3px; 453 | margin-top: 3px; 454 | cursor: pointer; 455 | } 456 | 457 | img.inheritance { 458 | border: 0px 459 | } 460 | 461 | form.pfform { 462 | margin: 10px 0 20px 0; 463 | } 464 | 465 | table.contentstable { 466 | width: 90%; 467 | } 468 | 469 | table.contentstable p.biglink { 470 | line-height: 150%; 471 | } 472 | 473 | a.biglink { 474 | font-size: 1.3em; 475 | } 476 | 477 | span.linkdescr { 478 | font-style: italic; 479 | padding-top: 5px; 480 | font-size: 90%; 481 | } 482 | 483 | ul.search { 484 | margin: 10px 0 0 20px; 485 | padding: 0; 486 | } 487 | 488 | ul.search li { 489 | padding: 5px 0 5px 20px; 490 | background-image: url(file.png); 491 | background-repeat: no-repeat; 492 | background-position: 0 7px; 493 | } 494 | 495 | ul.search li a { 496 | font-weight: bold; 497 | } 498 | 499 | ul.search li div.context { 500 | color: #888; 501 | margin: 2px 0 0 30px; 502 | text-align: left; 503 | } 504 | 505 | ul.keywordmatches li.goodmatch a { 506 | font-weight: bold; 507 | } 508 | -------------------------------------------------------------------------------- /doc/_static/drawing.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 28 | 30 | 34 | 38 | 39 | 49 | 59 | 69 | 79 | 89 | 99 | 109 | 119 | 120 | 138 | 140 | 141 | 143 | image/svg+xml 144 | 146 | 147 | 148 | 149 | 150 | 155 | 158 | 163 | 173 | 183 | 193 | 203 | 208 | 213 | 218 | 224 | 229 | 234 | 239 | 245 | 250 | 255 | 260 | 261 | pyDOE 273 | 277 | A B C0 0 11 0 00 1 01 1 1 309 | 314 | 315 | Design of Experiments for Python 327 | 328 | 329 | -------------------------------------------------------------------------------- /doc/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_static/favicon.ico -------------------------------------------------------------------------------- /doc/_static/lhs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_static/lhs.png -------------------------------------------------------------------------------- /doc/_static/lhs_custom_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_static/lhs_custom_distribution.png -------------------------------------------------------------------------------- /doc/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicumu/pyDOE2/9640636a2380bdddad5f4955e73324923a85d09c/doc/_static/logo.png -------------------------------------------------------------------------------- /doc/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {% block rootrellink %} 4 | {{ toctree() }} 5 | {% endblock %} 6 | 7 | 8 | {% block relbar1 %} 9 | 10 |
11 | ad 13 |
14 | {{ super() }} 15 | {% endblock %} 16 | 17 | 18 | {#############################################################################} 19 | {# Sidebar customization #) 20 | 21 | {# put the sidebar before the body #} 22 | {% block sidebar1 %} 23 | 24 | {%- macro sidebar() %} 25 | {%- if not embedded %}{% if not theme_nosidebar|tobool %} 26 |
27 |
28 | {%- block sidebarlogo %} 29 | {%- if logo %} 30 | 33 | {%- endif %} 34 | {%- endblock %} 35 | {%- block sidebartoc %} 36 | {%- block sidebarglobaltoc %} 37 |

{{ _('Table of contents') }}

38 | {{ toctree() }} 39 | {%- endblock %} 40 | {%- endblock %} 41 | {%- block sidebarrel %} 42 | {%- endblock %} 43 | {%- block sidebarsourcelink %} 44 | {%- if show_source and has_source and sourcename %} 45 |

{{ _('This Page') }}

46 | 50 | {%- endif %} 51 | {%- endblock %} 52 | {%- if customsidebar %} 53 | {% include customsidebar %} 54 | {%- endif %} 55 | {%- if display_toc %} 56 |

{{ _('Section contents') }}

57 | {{ toc }} 58 | {%- endif %} 59 | {%- block sidebarsearch %} 60 | {%- if pagename != "search" %} 61 | 73 | 74 | {%- endif %} 75 | {%- endblock %} 76 | {%- block copyright %} 77 |

Documentation license

78 | Creative Commons License 79 | {%- endblock %} 80 |
81 |
82 | {%- endif %}{% endif %} 83 | {%- endmacro %} 84 | 85 | {{ sidebar() }}{% endblock %} 86 | 87 | 88 | {% block sidebar2 %}{% endblock %} 89 | 90 | -------------------------------------------------------------------------------- /doc/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ad Python package documentation build configuration file, created by 4 | # sphinx-quickstart on Tue Jun 8 18:32:22 2010. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | from datetime import date 15 | 16 | import sys, os 17 | 18 | sys.path.insert(0, os.path.abspath('..')) 19 | 20 | import pyDOE2 21 | 22 | # If extensions (or modules to document with autodoc) are in another directory, 23 | # add these directories to sys.path here. If the directory is relative to the 24 | # documentation root, use os.path.abspath to make it absolute, like shown here. 25 | #sys.path.append(os.path.abspath('.')) 26 | 27 | # -- General configuration ----------------------------------------------------- 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be extensions 30 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 31 | extensions = [] 32 | 33 | # Add any paths that contain templates here, relative to this directory. 34 | templates_path = ['_templates'] 35 | 36 | # The suffix of source filenames. 37 | source_suffix = '.rst' 38 | 39 | # The encoding of source files. 40 | #source_encoding = 'utf-8' 41 | 42 | # The master toctree document. 43 | master_doc = 'index_TOC' 44 | 45 | # General information about the project. 46 | project = u'pyDOE2' 47 | if date.today().year!=2013: 48 | copyright = u'2013–%d, Abraham Lee' % date.today().year 49 | else: 50 | copyright = u'2013, Abraham Lee' 51 | 52 | # The version info for the project you're documenting, acts as replacement for 53 | # |version| and |release|, also used in various other places throughout the 54 | # built documents. 55 | # 56 | # The short X.Y version. 57 | version = '1' 58 | # The full version, including alpha/beta/rc tags. 59 | release = pyDOE2.__version__ 60 | 61 | # The language for content autogenerated by Sphinx. Refer to documentation 62 | # for a list of supported languages. 63 | #language = None 64 | 65 | # There are two options for replacing |today|: either, you set today to some 66 | # non-false value, then it is used: 67 | #today = '' 68 | # Else, today_fmt is used as the format for a strftime call. 69 | #today_fmt = '%B %d, %Y' 70 | 71 | # List of documents that shouldn't be included in the build. 72 | #unused_docs = [] 73 | 74 | # List of directories, relative to source directory, that shouldn't be searched 75 | # for source files. 76 | exclude_trees = ['_build'] 77 | 78 | # The reST default role (used for this markup: `text`) to use for all documents. 79 | #default_role = None 80 | 81 | # If true, '()' will be appended to :func: etc. cross-reference text. 82 | #add_function_parentheses = True 83 | 84 | # If true, the current module name will be prepended to all description 85 | # unit titles (such as .. function::). 86 | #add_module_names = True 87 | 88 | # If true, sectionauthor and moduleauthor directives will be shown in the 89 | # output. They are ignored by default. 90 | #show_authors = False 91 | 92 | # The name of the Pygments (syntax highlighting) style to use. 93 | pygments_style = 'sphinx' 94 | 95 | # A list of ignored prefixes for module index sorting. 96 | #modindex_common_prefix = [] 97 | 98 | 99 | # -- Options for HTML output --------------------------------------------------- 100 | 101 | # The theme to use for HTML and HTML Help pages. Major themes that come with 102 | # Sphinx are currently 'default' and 'sphinxdoc'. 103 | html_theme = 'sphinxdoc' 104 | 105 | # Theme options are theme-specific and customize the look and feel of a theme 106 | # further. For a list of options available for each theme, see the 107 | # documentation. 108 | # html_theme_options = {} 109 | 110 | # Add any paths that contain custom themes here, relative to this directory. 111 | #html_theme_path = [] 112 | 113 | # The name for this set of Sphinx documents. If None, it defaults to 114 | # " v documentation". 115 | #html_title = None 116 | 117 | # A shorter title for the navigation bar. Default is the same as html_title. 118 | #html_short_title = None 119 | 120 | # The name of an image file (relative to this directory) to place at the top 121 | # of the sidebar. 122 | #html_logo = None 123 | 124 | # The name of an image file (within the static path) to use as favicon of the 125 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 126 | # pixels large. 127 | html_favicon = 'favicon.ico' 128 | 129 | # Add any paths that contain custom static files (such as style sheets) here, 130 | # relative to this directory. They are copied after the builtin static files, 131 | # so a file named "default.css" will overwrite the builtin "default.css". 132 | html_static_path = ['_static'] 133 | 134 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 135 | # using the given strftime format. 136 | #html_last_updated_fmt = '%b %d, %Y' 137 | 138 | # If true, SmartyPants will be used to convert quotes and dashes to 139 | # typographically correct entities. 140 | #html_use_smartypants = True 141 | 142 | # Custom sidebar templates, maps document names to template names. 143 | #html_sidebars = {} 144 | 145 | # Additional templates that should be rendered to pages, maps page names to 146 | # template names. 147 | #html_additional_pages = {} 148 | 149 | # If false, no module index is generated. 150 | #html_use_modindex = True 151 | 152 | # If false, no index is generated. 153 | #html_use_index = True 154 | 155 | # If true, the index is split into individual pages for each letter. 156 | #html_split_index = False 157 | 158 | # If true, links to the reST sources are added to the pages. 159 | html_show_sourcelink = False 160 | 161 | # If true, an OpenSearch description file will be output, and all pages will 162 | # contain a tag referring to it. The value of this option must be the 163 | # base URL from which the finished HTML is served. 164 | #html_use_opensearch = '' 165 | 166 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). 167 | #html_file_suffix = '' 168 | 169 | # Output file base name for HTML help builder. 170 | htmlhelp_basename = 'pyDOEPythonPackagedoc' 171 | 172 | 173 | # -- Options for LaTeX output -------------------------------------------------- 174 | 175 | # The paper size ('letter' or 'a4'). 176 | #latex_paper_size = 'letter' 177 | 178 | # The font size ('10pt', '11pt' or '12pt'). 179 | #latex_font_size = '10pt' 180 | 181 | # Grouping the document tree into LaTeX files. List of tuples 182 | # (source start file, target name, title, author, documentclass [howto/manual]). 183 | # latex_documents = [ 184 | # ('index_TOC', 'adPythonPackage.tex', u'ad Python package Documentation', 185 | # u'Abraham Lee', 'manual'), 186 | # ] 187 | 188 | # The name of an image file (relative to this directory) to place at the top of 189 | # the title page. 190 | #latex_logo = None 191 | 192 | # For "manual" documents, if this is true, then toplevel headings are parts, 193 | # not chapters. 194 | #latex_use_parts = False 195 | 196 | # Additional stuff for the LaTeX preamble. 197 | #latex_preamble = '' 198 | 199 | # Documents to append as an appendix to all manuals. 200 | #latex_appendices = [] 201 | 202 | # If false, no module index is generated. 203 | #latex_use_modindex = True 204 | -------------------------------------------------------------------------------- /doc/factorial.rst: -------------------------------------------------------------------------------- 1 | .. _factorial: 2 | 3 | ================================================================================ 4 | Factorial Designs 5 | ================================================================================ 6 | 7 | In this section, the following kinds of *factorial designs* will be described: 8 | 9 | - :ref:`General Full-Factorial ` 10 | - :ref:`2-Level Full-Factorial <2_level_full_factorial>` 11 | - :ref:`2-Level Fractional-Factorial ` 12 | - :ref:`Plackett-Burman ` 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | 20 | .. index:: General Full-Factorial 21 | 22 | .. _general_full_factorial: 23 | 24 | General Full-Factorial (``fullfact``) 25 | ===================================== 26 | 27 | This kind of design offers full flexibility as to the number of discrete 28 | levels for each factor in the design. Its usage is simple:: 29 | 30 | >>> fullfact(levels) 31 | 32 | where ``levels`` is an array of integers, like:: 33 | 34 | >>> fullfact([2, 3]) 35 | array([[ 0., 0.], 36 | [ 1., 0.], 37 | [ 0., 1.], 38 | [ 1., 1.], 39 | [ 0., 2.], 40 | [ 1., 2.]]) 41 | 42 | As can be seen in the output, the design matrix has as many columns as 43 | items in the input array. 44 | 45 | .. index:: 2-Level Full Factorial 46 | 47 | .. _2_level_full_factorial: 48 | 49 | 2-Level Full-Factorial (``ff2n``) 50 | ================================= 51 | 52 | This function is a convenience wrapper to ``fullfact`` that forces all the 53 | factors to have two levels each, you simple tell it how many factors to 54 | create a design for:: 55 | 56 | >>> ff2n(3) 57 | array([[-1., -1., -1.], 58 | [ 1., -1., -1.], 59 | [-1., 1., -1.], 60 | [ 1., 1., -1.], 61 | [-1., -1., 1.], 62 | [ 1., -1., 1.], 63 | [-1., 1., 1.], 64 | [ 1., 1., 1.]]) 65 | 66 | .. index:: 2-Level Fractional Factorial 67 | 68 | .. _fractional_factorial: 69 | 70 | 2-Level Fractional-Factorial (``fracfact``) 71 | =========================================== 72 | 73 | This function requires a little more knowledge of how the *confounding* 74 | will be allowed (this means that some factor effects get muddled with 75 | other interaction effects, so it's harder to distinguish between them). 76 | 77 | Let's assume that we just can't afford (for whatever reason) the number 78 | of runs in a *full-factorial* design. We can systematically decide on a 79 | *fraction of the full-factorial* by allowing some of the factor *main 80 | effects* to be confounded with other factor *interaction effects*. This 81 | is done by defining an *alias* structure that defines, symbolically, 82 | these interactions. These alias structures are written like "C = AB" or 83 | "I = ABC", or "AB = CD", etc. These define how one column is related to 84 | the others. 85 | 86 | For example, the alias "C = AB" or "I = ABC" indicate that there are 87 | three factors (A, B, and C) and that the main effect of factor 88 | C is confounded with the interaction effect of the product AB, and by 89 | extension, A is confounded with BC and B is confounded with AC. A full- 90 | factorial design with these three factors results in a design matrix with 91 | 8 runs, but we will assume that we can only afford 4 of those runs. To 92 | create this *fractional* design, we need a matrix with three columns, one 93 | for A, B, and C, only now where the levels in the C column is created by 94 | the product of the A and B columns. 95 | 96 | The input to ``fracfact`` is a generator string of symbolic characters 97 | (lowercase or uppercase, but not both) separated by spaces, like:: 98 | 99 | >>> gen = 'a b ab' 100 | 101 | This design would result in a 3-column matrix, where the third column is 102 | implicitly defined as ``"c = ab"``. This means that the factor in the third 103 | column is confounded with the interaction of the factors in the first two 104 | columns. The design ends up looking like this:: 105 | 106 | >>> fracfact('a b ab') 107 | array([[-1., -1., 1.], 108 | [ 1., -1., -1.], 109 | [-1., 1., -1.], 110 | [ 1., 1., 1.]]) 111 | 112 | Fractional factorial designs are usually specified using the notation 113 | 2^(k-p), where k is the number of columns and p is the number 114 | of effects that are confounded. In terms of *resolution* level, higher is 115 | "better". The above design would be considered a 2^(3-1) 116 | fractional factorial design, a 1/2-fraction design, or a *Resolution III* 117 | design (since the smallest alias "I=ABC" has three terms on the right-hand 118 | side). Another common design is a Resolution III, 2^(7-4) 119 | fractional factorial and would be created using the following string 120 | generator:: 121 | 122 | >>> fracfact('a b ab c ac bc abc') 123 | array([[-1., -1., 1., -1., 1., 1., -1.], 124 | [ 1., -1., -1., -1., -1., 1., 1.], 125 | [-1., 1., -1., -1., 1., -1., 1.], 126 | [ 1., 1., 1., -1., -1., -1., -1.], 127 | [-1., -1., 1., 1., -1., -1., 1.], 128 | [ 1., -1., -1., 1., 1., -1., -1.], 129 | [-1., 1., -1., 1., -1., 1., -1.], 130 | [ 1., 1., 1., 1., 1., 1., 1.]]) 131 | 132 | More sophisticated generator strings can be created using the "+" and 133 | "-" operators. The "-" operator swaps the levels of that column like 134 | this:: 135 | 136 | >>> fracfact('a b -ab') 137 | array([[-1., -1., -1.], 138 | [ 1., -1., 1.], 139 | [-1., 1., 1.], 140 | [ 1., 1., -1.]]) 141 | 142 | In order to reduce confounding, we can utilize the ``fold`` function:: 143 | 144 | >>> m = fracfact('a b ab') 145 | >>> fold(m) 146 | array([[-1., -1., 1.], 147 | [ 1., -1., -1.], 148 | [-1., 1., -1.], 149 | [ 1., 1., 1.], 150 | [ 1., 1., -1.], 151 | [-1., 1., 1.], 152 | [ 1., -1., 1.], 153 | [-1., -1., -1.]]) 154 | 155 | Applying the fold to all columns in the design breaks the alias chains 156 | between every *main factor and two-factor interactions*. This means that 157 | we can then estimate *all the main effects clear of any two-factor 158 | interactions*. Typically, when all columns are folded, this "upgrades" 159 | the resolution of the design. 160 | 161 | By default, ``fold`` applies the level swapping to all columns, but we can 162 | fold specific columns (first column = 0), if desired, by supplying an array 163 | to the keyword ``columns``:: 164 | 165 | >>> fold(m, columns=[2]) 166 | array([[-1., -1., 1.], 167 | [ 1., -1., -1.], 168 | [-1., 1., -1.], 169 | [ 1., 1., 1.], 170 | [-1., -1., -1.], 171 | [ 1., -1., 1.], 172 | [-1., 1., 1.], 173 | [ 1., 1., -1.]]) 174 | 175 | Another way to reduce confounding it to scan several (or all) available 176 | fractional designs and pick the one that has less confounding. The function 177 | ``fracfact_opt`` performs just that. For a 2^k-p fractional factorial the 178 | function scans all generators that create at most 2^k-p experiments, and pick 179 | the one that has confounding on interactions of order as high as possible: 180 | 181 | >>> design, alias_map, alias_cost = fracfact_opt(6, 2) 182 | >>> design 183 | 'a b c d bcd acd' 184 | >>> print('\n'.join(alias_map)) 185 | a = bef = cdf = abcde 186 | b = aef = cde = abcdf 187 | c = adf = bde = abcef 188 | d = acf = bce = abdef 189 | e = abf = bcd = acdef 190 | f = abe = acd = bcdef 191 | af = be = cd = abcdef 192 | ab = ef = acde = bcdf 193 | ac = df = abde = bcef 194 | ad = cf = abce = bdef 195 | ae = bf = abcd = cdef 196 | bc = de = abdf = acef 197 | bd = ce = abcf = adef 198 | abc = ade = bdf = cef 199 | abd = ace = bcf = def 200 | abef = acdf = bcde 201 | 202 | You can generate the human-readable alias_map of any design with the function 203 | `fracfact_aliasing`: 204 | 205 | >>> print('\n'.join(fracfact_aliasing(fracfact('a b ab'))[0])) 206 | a = bc 207 | b = ac 208 | c = ab 209 | abc 210 | 211 | .. note:: 212 | Care should be taken to decide the appropriate alias structure for 213 | your design and the effects that folding has on it. 214 | 215 | 2-Level Fractional-Factorial specified by resolution (``fracfact_by_res``) 216 | -------------------------------------------------------------------------- 217 | 218 | This function constructs a minimal design at given resolution. It does so 219 | by constructing a generator string with a minimal number of base factors 220 | and passes it to ``fracfact``. This approach favors convenience over 221 | fine-grained control over which factors that are confounded. 222 | 223 | To construct a 6-factor, resolution III-design, ``fractfact_by_res`` 224 | is used like this:: 225 | 226 | >>> fracfact_by_res(6, 3) 227 | array([[-1., -1., -1., 1., 1., 1.], 228 | [ 1., -1., -1., -1., -1., 1.], 229 | [-1., 1., -1., -1., 1., -1.], 230 | [ 1., 1., -1., 1., -1., -1.], 231 | [-1., -1., 1., 1., -1., -1.], 232 | [ 1., -1., 1., -1., 1., -1.], 233 | [-1., 1., 1., -1., -1., 1.], 234 | [ 1., 1., 1., 1., 1., 1.]]) 235 | 236 | .. index:: Plackett-Burman 237 | 238 | .. _plackett_burman: 239 | 240 | Plackett-Burman (``pbdesign``) 241 | ============================== 242 | 243 | Another way to generate fractional-factorial designs is through the use 244 | of **Plackett-Burman** designs. These designs are unique in that the 245 | number of trial conditions (rows) expands by multiples of four (e.g. 4, 246 | 8, 12, etc.). The max number of columns allowed before a design increases 247 | the number of rows is always one less than the next higher multiple of four. 248 | 249 | For example, I can use up to 3 factors in a design with 4 rows:: 250 | 251 | >>> pbdesign(3) 252 | array([[-1., -1., 1.], 253 | [ 1., -1., -1.], 254 | [-1., 1., -1.], 255 | [ 1., 1., 1.]]) 256 | 257 | But if I want to do 4 factors, the design needs to increase the number 258 | of rows up to the next multiple of four (8 in this case):: 259 | 260 | >>> pbdesign(4) 261 | array([[-1., -1., 1., -1.], 262 | [ 1., -1., -1., -1.], 263 | [-1., 1., -1., -1.], 264 | [ 1., 1., 1., -1.], 265 | [-1., -1., 1., 1.], 266 | [ 1., -1., -1., 1.], 267 | [-1., 1., -1., 1.], 268 | [ 1., 1., 1., 1.]]) 269 | 270 | Thus, an 8-run Plackett-Burman design can handle up to (8 - 1) = 7 factors. 271 | 272 | As a side note, It just so happens that the Plackett-Burman and 2^(7-4) 273 | fractional factorial design are identical:: 274 | 275 | >>> np.all(pbdesign(7)==fracfact('a b ab c ac bc abc')) 276 | True 277 | 278 | .. index:: Factorial Designs Support 279 | 280 | More Information 281 | ================ 282 | 283 | If the user needs more information about appropriate designs, please 284 | consult the following articles on Wikipedia: 285 | 286 | - `Factorial designs`_ 287 | - `Plackett-Burman designs`_ 288 | 289 | There is also a wealth of information on the `NIST`_ website about the 290 | various design matrices that can be created as well as detailed information 291 | about designing/setting-up/running experiments in general. 292 | 293 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 294 | 295 | .. _author: mailto:tisimst@gmail.com 296 | .. _Factorial designs: http://en.wikipedia.org/wiki/Factorial_experiment 297 | .. _Plackett-Burman designs: http://en.wikipedia.org/wiki/Plackett-Burman_design 298 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | .. meta:: 2 | :description: Design of experiments for Python 3 | :keywords: DOE, design of experiments, experimental design, 4 | optimization, statistics 5 | 6 | ===================================================== 7 | ``pyDOE``: The experimental design package for python 8 | ===================================================== 9 | 10 | The ``pyDOE`` package is designed to help the 11 | **scientist, engineer, statistician,** etc., to construct appropriate 12 | **experimental designs**. 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | Capabilities 20 | ============ 21 | 22 | The package currently includes functions for creating designs for any 23 | number of factors: 24 | 25 | - :ref:`Factorial Designs ` 26 | 27 | #. :ref:`General Full-Factorial ` (``fullfact``) 28 | 29 | #. :ref:`2-Level Full-Factorial <2_level_full_factorial>` (``ff2n``) 30 | 31 | #. :ref:`2-Level Fractional-Factorial ` (``fracfact``) 32 | 33 | #. :ref:`Plackett-Burman ` (``pbdesign``) 34 | 35 | - :ref:`Response-Surface Designs ` 36 | 37 | #. :ref:`Box-Behnken ` (``bbdesign``) 38 | 39 | #. :ref:`Central-Composite ` (``ccdesign``) 40 | 41 | - :ref:`Randomized Designs ` 42 | 43 | #. :ref:`Latin-Hypercube ` (``lhs``) 44 | 45 | Requirements 46 | ============ 47 | 48 | - NumPy 49 | - SciPy 50 | 51 | .. index:: installation 52 | 53 | .. _installing this package: 54 | 55 | Installation and download 56 | ========================= 57 | 58 | Important note 59 | -------------- 60 | 61 | The installation commands below should be **run in a DOS or Unix 62 | command shell** (*not* in a Python shell). 63 | 64 | Under Windows (version 7 and earlier), a command shell can be obtained 65 | by running ``cmd.exe`` (through the Run… menu item from the Start 66 | menu). Under Unix (Linux, Mac OS X,…), a Unix shell is available when 67 | opening a terminal (in Mac OS X, the Terminal program is found in the 68 | Utilities folder, which can be accessed through the Go menu in the 69 | Finder). 70 | 71 | Automatic install or upgrade 72 | ---------------------------- 73 | 74 | One of the automatic installation or upgrade procedures below might work 75 | on your system, if you have a Python package installer or use certain 76 | Linux distributions. 77 | 78 | Under Unix, it may be necessary to prefix the commands below with 79 | ``sudo``, so that the installation program has **sufficient access 80 | rights to the system**. 81 | 82 | If you have `pip `_, you can try to install 83 | the latest version with 84 | 85 | .. code-block:: sh 86 | 87 | pip install --upgrade pyDOE 88 | 89 | If you have setuptools_, you can try to automatically install or 90 | upgrade this package with 91 | 92 | .. code-block:: sh 93 | 94 | easy_install --upgrade pyDOE 95 | 96 | Manual download and install 97 | --------------------------- 98 | 99 | Alternatively, you can simply download_ the package archive from the 100 | Python Package Index (PyPI) and unpack it. The package can then be 101 | installed by **going into the unpacked directory** 102 | (:file:`pyDOE-...`), and running the provided :file:`setup.py` 103 | program with 104 | 105 | .. code-block:: sh 106 | 107 | python setup.py install 108 | 109 | or, for an installation in the user Python library (no additional access 110 | rights needed): 111 | 112 | .. code-block:: sh 113 | 114 | python setup.py install --user 115 | 116 | or, for an installation in a custom directory :file:`my_directory`: 117 | 118 | .. code-block:: sh 119 | 120 | python setup.py install --install-lib my_directory 121 | 122 | or, if additional access rights are needed (Unix): 123 | 124 | .. code-block:: sh 125 | 126 | sudo python setup.py install 127 | 128 | You can also simply **move** the :file:`pyDOE-py*` directory 129 | that corresponds best to your version of Python to a location that 130 | Python can import from (directory in which scripts using 131 | :mod:`pyDOE` are run, etc.); the chosen 132 | :file:`pyDOE-py*` directory should then be renamed 133 | :file:`pyDOE`. Python 3 users should then run ``2to3 -w .`` 134 | from inside this directory so as to automatically adapt the code to 135 | Python 3. 136 | 137 | Source code 138 | ----------- 139 | 140 | The latest, bleeding-edge but working `code 141 | `_ 142 | and `documentation source 143 | `_ are 144 | available `on GitHub `_. 145 | 146 | .. index:: support 147 | 148 | Contact 149 | ======= 150 | 151 | Any feedback, questions, bug reports, or success stores should 152 | be sent to the `author`_. I'd love to hear from you! 153 | 154 | Credits 155 | ======= 156 | 157 | This code was originally published by the following individuals for use with 158 | Scilab: 159 | 160 | - Copyright (C) 2012 - 2013 - Michael Baudin 161 | - Copyright (C) 2012 - Maria Christopoulou 162 | - Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 163 | - Copyright (C) 2009 - Yann Collette 164 | - Copyright (C) 2009 - CEA - Jean-Marc Martinez 165 | 166 | - Website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 167 | 168 | Much thanks goes to these individuals. 169 | 170 | License 171 | ======= 172 | 173 | This package is provided under two licenses: 174 | 175 | 1. The *BSD License* (3-Clause) 176 | 2. Any other that the author approves (just ask!) 177 | 178 | References 179 | ========== 180 | 181 | - `Factorial designs`_ 182 | - `Plackett-Burman designs`_ 183 | - `Box-Behnken designs`_ 184 | - `Central composite designs`_ 185 | - `Latin-Hypercube designs`_ 186 | 187 | There is also a wealth of information on the `NIST`_ website about the 188 | various design matrices that can be created as well as detailed information 189 | about designing/setting-up/running experiments in general. 190 | 191 | .. _author: mailto:tisimst@gmail.com 192 | .. _Factorial designs: http://en.wikipedia.org/wiki/Factorial_experiment 193 | .. _Box-Behnken designs: http://en.wikipedia.org/wiki/Box-Behnken_design 194 | .. _Central composite designs: http://en.wikipedia.org/wiki/Central_composite_design 195 | .. _Plackett-Burman designs: http://en.wikipedia.org/wiki/Plackett-Burman_design 196 | .. _Latin-Hypercube designs: http://en.wikipedia.org/wiki/Latin_hypercube_sampling 197 | .. _setuptools: http://pypi.python.org/pypi/setuptools 198 | .. _download: http://pypi.python.org/pypi/pyDOE/#downloads 199 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm 200 | -------------------------------------------------------------------------------- /doc/index_TOC.rst: -------------------------------------------------------------------------------- 1 | Table of Contents 2 | ================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | Overview 8 | Factorial Designs 9 | Response Surface Designs 10 | Randomized Designs 11 | 12 | -------------------------------------------------------------------------------- /doc/randomized.rst: -------------------------------------------------------------------------------- 1 | .. index:: Randomized Designs 2 | 3 | .. _randomized: 4 | 5 | ================================================================================ 6 | Randomized Designs 7 | ================================================================================ 8 | 9 | In this section, the following kinds of *randomized designs* will 10 | be described: 11 | 12 | - Latin-Hypercube 13 | 14 | .. hint:: 15 | All available designs can be accessed after a simple import statement:: 16 | 17 | >>> from pyDOE import * 18 | 19 | .. index:: Latin-Hypercube 20 | 21 | .. _latin_hypercube: 22 | 23 | Latin-Hypercube (``lhs``) 24 | ========================= 25 | 26 | .. image:: _static/lhs.png 27 | 28 | Latin-hypercube designs can be created using the following simple syntax:: 29 | 30 | >>> lhs(n, [samples, criterion, iterations]) 31 | 32 | where 33 | 34 | * **n**: an integer that designates the number of factors (required) 35 | * **samples**: an integer that designates the number of sample points to 36 | generate for each factor (default: n) 37 | * **criterion**: a string that tells ``lhs`` how to sample the points 38 | (default: None, which simply randomizes the points within the intervals): 39 | 40 | - "center" or "c": center the points within the sampling intervals 41 | - "maximin" or "m": maximize the minimum distance between points, but 42 | place the point in a randomized location within its interval 43 | - "centermaximin" or "cm": same as "maximin", but centered within the 44 | intervals 45 | - "correlation" or "corr": minimize the maximum correlation coefficient 46 | - "lhsmu" : Latin hypercube with multifimensional Uniformity. Correlation between 47 | variable can be enforced by setting a valid correlation matrix. Description of the 48 | algorithm can be found in `Deutsch and Deutsch`_. 49 | 50 | The output design scales all the variable ranges from zero to one which 51 | can then be transformed as the user wishes (like to a specific statistical 52 | distribution using the `scipy.stats.distributions`_ ``ppf`` (inverse 53 | cumulative distribution) function. An example of this is :ref:`shown below 54 | `. 55 | 56 | For example, if I wanted to transform the uniform distribution of 8 samples 57 | to a normal distribution (mean=0, standard deviation=1), I would do 58 | something like:: 59 | 60 | >>> from scipy.stats.distributions import norm 61 | >>> lhd = lhs(2, samples=5) 62 | >>> lhd = norm(loc=0, scale=1).ppf(lhd) # this applies to both factors here 63 | 64 | Graphically, each transformation would look like the following, going 65 | from the blue sampled points (from using ``lhs``) to the green 66 | sampled points that are normally distributed: 67 | 68 | .. image:: _static/lhs_custom_distribution.png 69 | 70 | Examples 71 | -------- 72 | 73 | A basic 4-factor latin-hypercube design:: 74 | 75 | >>> lhs(4, criterion='center') 76 | array([[ 0.875, 0.625, 0.875, 0.125], 77 | [ 0.375, 0.125, 0.375, 0.375], 78 | [ 0.625, 0.375, 0.125, 0.625], 79 | [ 0.125, 0.875, 0.625, 0.875]]) 80 | 81 | Let's say we want more samples, like 10:: 82 | 83 | >>> lhs(4, samples=10, criterion='center') 84 | array([[ 0.05, 0.05, 0.15, 0.15], 85 | [ 0.55, 0.85, 0.95, 0.75], 86 | [ 0.25, 0.25, 0.45, 0.25], 87 | [ 0.45, 0.35, 0.75, 0.45], 88 | [ 0.75, 0.55, 0.25, 0.55], 89 | [ 0.95, 0.45, 0.35, 0.05], 90 | [ 0.35, 0.95, 0.05, 0.65], 91 | [ 0.15, 0.65, 0.55, 0.35], 92 | [ 0.85, 0.75, 0.85, 0.85], 93 | [ 0.65, 0.15, 0.65, 0.95]]) 94 | 95 | .. _statistical_distribution_usage: 96 | 97 | Customizing with Statistical Distributions 98 | ------------------------------------------ 99 | 100 | Now, let's say we want to transform these designs to be normally 101 | distributed with means = [1, 2, 3, 4] and standard deviations = [0.1, 102 | 0.5, 1, 0.25]:: 103 | 104 | >>> design = lhs(4, samples=10) 105 | >>> from scipy.stats.distributions import norm 106 | >>> means = [1, 2, 3, 4] 107 | >>> stdvs = [0.1, 0.5, 1, 0.25] 108 | >>> for i in xrange(4): 109 | ... design[:, i] = norm(loc=means[i], scale=stdvs[i]).ppf(design[:, i]) 110 | ... 111 | >>> design 112 | array([[ 0.84947986, 2.16716215, 2.81669487, 3.96369414], 113 | [ 1.15820413, 1.62692745, 2.28145071, 4.25062028], 114 | [ 0.99159933, 2.6444164 , 2.14908071, 3.45706066], 115 | [ 1.02627463, 1.8568382 , 3.8172492 , 4.16756309], 116 | [ 1.07459909, 2.30561153, 4.09567327, 4.3881782 ], 117 | [ 0.896079 , 2.0233295 , 1.54235909, 3.81888286], 118 | [ 1.00415 , 2.4246118 , 3.3500082 , 4.07788558], 119 | [ 0.91999246, 1.50179698, 2.70669743, 3.7826346 ], 120 | [ 0.97030478, 1.99322045, 3.178122 , 4.04955409], 121 | [ 1.12124679, 1.22454846, 4.52414072, 3.8707982 ]]) 122 | 123 | .. note:: 124 | Methods for "space-filling" designs and "orthogonal" designs are in 125 | the works, so stay tuned! However, simply increasing the samples 126 | reduces the need for these anyway. 127 | 128 | .. index:: Latin-Hypercube Designs Support 129 | 130 | More Information 131 | ================ 132 | 133 | If the user needs more information about appropriate designs, please 134 | consult the following articles on Wikipedia: 135 | 136 | - `Latin-Hypercube designs`_ 137 | 138 | There is also a wealth of information on the `NIST`_ website about the 139 | various design matrices that can be created as well as detailed information 140 | about designing/setting-up/running experiments in general. 141 | 142 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 143 | 144 | .. _author: mailto:tisimst@gmail.com 145 | .. _Latin-Hypercube designs: http://en.wikipedia.org/wiki/Latin_hypercube_sampling 146 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm 147 | .. _scipy.stats.distributions: http://docs.scipy.org/doc/scipy/reference/stats.html 148 | .. _Deutsch and Deutsch : https://www.sciencedirect.com/science/article/pii/S0378375811003776?via%3Dihub -------------------------------------------------------------------------------- /doc/rsm.rst: -------------------------------------------------------------------------------- 1 | .. index:: Response Surface Designs, RSM 2 | 3 | .. _response_surface: 4 | 5 | ================================================================================ 6 | Response Surface Designs 7 | ================================================================================ 8 | 9 | In this section, the following kinds of *response surface designs* will 10 | be described: 11 | 12 | - :ref:`Box-Behnken ` 13 | - :ref:`Central Composite ` 14 | 15 | .. hint:: 16 | All available designs can be accessed after a simple import statement:: 17 | 18 | >>> from pyDOE import * 19 | 20 | .. index:: Box-Behnken 21 | 22 | .. _box_behnken: 23 | 24 | Box-Behnken (``bbdesign``) 25 | ========================== 26 | 27 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/bb.gif 28 | 29 | Box-Behnken designs can be created using the following simple syntax:: 30 | 31 | >>> bbdesign(n, center) 32 | 33 | where ``n`` is the number of factors (at least 3 required) and ``center`` 34 | is the number of center points to include. If no inputs given to 35 | ``center``, then a pre-determined number of points are automatically 36 | included. 37 | 38 | Examples 39 | -------- 40 | 41 | The default 3-factor Box-Behnken design:: 42 | 43 | >>> bbdesign(3) 44 | array([[-1., -1., 0.], 45 | [ 1., -1., 0.], 46 | [-1., 1., 0.], 47 | [ 1., 1., 0.], 48 | [-1., 0., -1.], 49 | [ 1., 0., -1.], 50 | [-1., 0., 1.], 51 | [ 1., 0., 1.], 52 | [ 0., -1., -1.], 53 | [ 0., 1., -1.], 54 | [ 0., -1., 1.], 55 | [ 0., 1., 1.], 56 | [ 0., 0., 0.], 57 | [ 0., 0., 0.], 58 | [ 0., 0., 0.]]) 59 | 60 | A customized design with four factors, but only a single center point:: 61 | 62 | >>> bbdesign(4, center=1) 63 | array([[-1., -1., 0., 0.], 64 | [ 1., -1., 0., 0.], 65 | [-1., 1., 0., 0.], 66 | [ 1., 1., 0., 0.], 67 | [-1., 0., -1., 0.], 68 | [ 1., 0., -1., 0.], 69 | [-1., 0., 1., 0.], 70 | [ 1., 0., 1., 0.], 71 | [-1., 0., 0., -1.], 72 | [ 1., 0., 0., -1.], 73 | [-1., 0., 0., 1.], 74 | [ 1., 0., 0., 1.], 75 | [ 0., -1., -1., 0.], 76 | [ 0., 1., -1., 0.], 77 | [ 0., -1., 1., 0.], 78 | [ 0., 1., 1., 0.], 79 | [ 0., -1., 0., -1.], 80 | [ 0., 1., 0., -1.], 81 | [ 0., -1., 0., 1.], 82 | [ 0., 1., 0., 1.], 83 | [ 0., 0., -1., -1.], 84 | [ 0., 0., 1., -1.], 85 | [ 0., 0., -1., 1.], 86 | [ 0., 0., 1., 1.], 87 | [ 0., 0., 0., 0.]]) 88 | 89 | .. index:: Central Composite 90 | 91 | .. _central_composite: 92 | 93 | Central Composite (``ccdesign``) 94 | ================================ 95 | 96 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/fig5.gif 97 | 98 | Central composite designs can be created and customized using the syntax:: 99 | 100 | >>> ccdesign(n, center, alpha, face) 101 | 102 | where 103 | 104 | - ``n`` is the number of factors, 105 | 106 | - ``center`` is a 2-tuple of center points (one for the factorial block, 107 | one for the star block, default (4, 4)), 108 | 109 | - ``alpha`` is either "orthogonal" (or "o", default) or "rotatable" 110 | (or "r") 111 | 112 | - ``face`` is either "circumscribed" (or "ccc", default), "inscribed" 113 | (or "cci"), or "faced" (or "ccf"). 114 | 115 | .. image:: http://www.itl.nist.gov/div898/handbook/pri/section3/gifs/ccd2.gif 116 | 117 | The two optional keyword arguments ``alpha`` and ``face`` help describe 118 | how the variance in the quadratic approximation is distributed. Please 119 | see the `NIST`_ web pages if you are uncertain which options are suitable 120 | for your situation. 121 | 122 | .. note:: 123 | - 'ccc' and 'cci' can be rotatable designs, but 'ccf' cannot. 124 | - If ``face`` is specified, while ``alpha`` is not, then the default 125 | value of ``alpha`` is 'orthogonal'. 126 | 127 | Examples 128 | -------- 129 | 130 | Simplest input, assuming default kwargs:: 131 | 132 | >>> ccdesign(2) 133 | array([[-1. , -1. ], 134 | [ 1. , -1. ], 135 | [-1. , 1. ], 136 | [ 1. , 1. ], 137 | [ 0. , 0. ], 138 | [ 0. , 0. ], 139 | [ 0. , 0. ], 140 | [ 0. , 0. ], 141 | [-1.41421356, 0. ], 142 | [ 1.41421356, 0. ], 143 | [ 0. , -1.41421356], 144 | [ 0. , 1.41421356], 145 | [ 0. , 0. ], 146 | [ 0. , 0. ], 147 | [ 0. , 0. ], 148 | [ 0. , 0. ]]) 149 | 150 | More customized input, say, for a set of computer experiments where there 151 | isn't variability so we only need a single center point:: 152 | 153 | >>> ccdesign(3, center=(0, 1), alpha='r', face='cci') 154 | array([[-0.59460356, -0.59460356, -0.59460356], 155 | [ 0.59460356, -0.59460356, -0.59460356], 156 | [-0.59460356, 0.59460356, -0.59460356], 157 | [ 0.59460356, 0.59460356, -0.59460356], 158 | [-0.59460356, -0.59460356, 0.59460356], 159 | [ 0.59460356, -0.59460356, 0.59460356], 160 | [-0.59460356, 0.59460356, 0.59460356], 161 | [ 0.59460356, 0.59460356, 0.59460356], 162 | [-1. , 0. , 0. ], 163 | [ 1. , 0. , 0. ], 164 | [ 0. , -1. , 0. ], 165 | [ 0. , 1. , 0. ], 166 | [ 0. , 0. , -1. ], 167 | [ 0. , 0. , 1. ], 168 | [ 0. , 0. , 0. ]]) 169 | 170 | .. index:: Response Surface Designs Support 171 | 172 | More Information 173 | ================ 174 | 175 | If the user needs more information about appropriate designs, please 176 | consult the following articles on Wikipedia: 177 | 178 | - `Box-Behnken designs`_ 179 | - `Central composite designs`_ 180 | 181 | There is also a wealth of information on the `NIST`_ website about the 182 | various design matrices that can be created as well as detailed information 183 | about designing/setting-up/running experiments in general. 184 | 185 | Any questions, comments, bug-fixes, etc. can be forwarded to the `author`_. 186 | 187 | .. _author: mailto:tisimst@gmail.com 188 | .. _Box-Behnken designs: http://en.wikipedia.org/wiki/Box-Behnken_design 189 | .. _Central composite designs: http://en.wikipedia.org/wiki/Central_composite_design 190 | .. _NIST: http://www.itl.nist.gov/div898/handbook/pri/pri.htm -------------------------------------------------------------------------------- /pyDOE2/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | pyDOE original code was originally converted from code by the following 3 | individuals for use with Scilab: 4 | 5 | - Copyright (C) 2012 - 2013 - Michael Baudin 6 | - Copyright (C) 2012 - Maria Christopoulou 7 | - Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 8 | - Copyright (C) 2009 - Yann Collette 9 | - Copyright (C) 2009 - CEA - Jean-Marc Martinez 10 | 11 | - Website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 12 | 13 | pyDOE was converted to Python by the following individual: 14 | 15 | - Copyright (c) 2014, Abraham D. Lee 16 | 17 | The following individuals forked and works on `pyDOE2`: 18 | 19 | - Copyright (C) 2018 - Rickard Sjoegren and Daniel Svensson 20 | """ 21 | 22 | from pyDOE2.doe_box_behnken import * 23 | from pyDOE2.doe_composite import * 24 | from pyDOE2.doe_factorial import * 25 | from pyDOE2.doe_lhs import * 26 | from pyDOE2.doe_fold import * 27 | from pyDOE2.doe_plackett_burman import * 28 | from pyDOE2.var_regression_matrix import * 29 | from pyDOE2.doe_gsd import gsd 30 | -------------------------------------------------------------------------------- /pyDOE2/build_regression_matrix.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | def grep(haystack, needle): 19 | start = 0 20 | while True: 21 | start = haystack.find(needle, start) 22 | if start==-1: 23 | return 24 | yield start 25 | start += len(needle) 26 | 27 | def build_regression_matrix(H, model, build=None): 28 | """ 29 | Build a regression matrix using a DOE matrix and a list of monomials. 30 | 31 | Parameters 32 | ---------- 33 | H : 2d-array 34 | model : str 35 | build : bool-array 36 | 37 | Returns 38 | ------- 39 | R : 2d-array 40 | 41 | """ 42 | ListOfTokens = model.split(' ') 43 | if H.shape[1]==1: 44 | size_index = len(str(H.shape[0])) 45 | else: 46 | size_index = len(str(H.shape[1])) 47 | 48 | if build is None: 49 | build = [True]*len(ListOfTokens) 50 | 51 | # Test if the vector has the wrong direction (lines instead of columns) 52 | if H.shape[0]==1: 53 | H = H.T 54 | 55 | # Collect the list of monomials 56 | Monom_Index = [] 57 | for i in range(len(ListOfTokens)): 58 | if build[i]: 59 | Monom_Index += [grep(ListOfTokens, 'x' + str(0)*(size_index - \ 60 | len(str(i))) + str(i))] 61 | 62 | Monom_Index = -np.sort(-Monom_Index) 63 | Monom_Index = np.unique(Monom_Index) 64 | 65 | if H.shape[1]==1: 66 | nb_var = H.shape[0] # vector "mode": the number of vars is equal to the number of lines of H 67 | VectorMode = True 68 | 69 | for i in range(nb_var): 70 | for j in range(ListOfTokens.shape[0]): 71 | ListOfTokens[j] = ListOfTokens[j].replace( 72 | 'x' + str(0)*(size_index - len(str(i))) + str(i), 73 | 'H(' + str(i) + ')') 74 | else: 75 | nb_var = H.shape[0] # matrix "mode": the number of vars is equal to the number of columns of H 76 | VectorMode = False 77 | 78 | for i in range(nb_var): 79 | for j in range(ListOfTokens.shape[0]): 80 | ListOfTokens[j] = ListOfTokens[j].replace( 81 | 'x' + str(0)*(size_index - len(str(i))) + str(i), 82 | 'H[i,' + str(i) + ')') 83 | 84 | # Now build the regression matrix 85 | if VectorMode: 86 | R = np.zeros((len(ListOfTokens), 1)) 87 | for j in range(len(ListOfTokens)): 88 | R[j, 0] = eval(ListOfTokens[j]) 89 | else: 90 | R = np.zeros((H.shape[0], len(ListOfTokens))) 91 | for i in range(H.shape[0]): 92 | for j in range(len(ListOfTokens)): 93 | R[i, j] = eval(ListOfTokens[j]) 94 | 95 | return R 96 | 97 | 98 | -------------------------------------------------------------------------------- /pyDOE2/doe_box_behnken.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | from pyDOE2.doe_factorial import ff2n 18 | from pyDOE2.doe_repeat_center import repeat_center 19 | 20 | __all__ = ['bbdesign'] 21 | 22 | def bbdesign(n, center=None): 23 | """ 24 | Create a Box-Behnken design 25 | 26 | Parameters 27 | ---------- 28 | n : int 29 | The number of factors in the design 30 | 31 | Optional 32 | -------- 33 | center : int 34 | The number of center points to include (default = 1). 35 | 36 | Returns 37 | ------- 38 | mat : 2d-array 39 | The design matrix 40 | 41 | Example 42 | ------- 43 | :: 44 | 45 | >>> bbdesign(3) 46 | array([[-1., -1., 0.], 47 | [ 1., -1., 0.], 48 | [-1., 1., 0.], 49 | [ 1., 1., 0.], 50 | [-1., 0., -1.], 51 | [ 1., 0., -1.], 52 | [-1., 0., 1.], 53 | [ 1., 0., 1.], 54 | [ 0., -1., -1.], 55 | [ 0., 1., -1.], 56 | [ 0., -1., 1.], 57 | [ 0., 1., 1.], 58 | [ 0., 0., 0.], 59 | [ 0., 0., 0.], 60 | [ 0., 0., 0.]]) 61 | 62 | """ 63 | assert n>=3, 'Number of variables must be at least 3' 64 | 65 | # First, compute a factorial DOE with 2 parameters 66 | H_fact = ff2n(2) 67 | # Now we populate the real DOE with this DOE 68 | 69 | # We made a factorial design on each pair of dimensions 70 | # - So, we created a factorial design with two factors 71 | # - Make two loops 72 | Index = 0 73 | nb_lines = int((0.5*n*(n-1))*H_fact.shape[0]) 74 | H = repeat_center(n, nb_lines) 75 | 76 | for i in range(n - 1): 77 | for j in range(i + 1, n): 78 | Index = Index + 1 79 | H[max([0, (Index - 1)*H_fact.shape[0]]):Index*H_fact.shape[0], i] = H_fact[:, 0] 80 | H[max([0, (Index - 1)*H_fact.shape[0]]):Index*H_fact.shape[0], j] = H_fact[:, 1] 81 | 82 | if center is None: 83 | if n<=16: 84 | points= [0, 0, 0, 3, 3, 6, 6, 6, 8, 9, 10, 12, 12, 13, 14, 15, 16] 85 | center = points[n] 86 | else: 87 | center = n 88 | 89 | H = np.c_[H.T, repeat_center(n, center).T].T 90 | 91 | return H 92 | -------------------------------------------------------------------------------- /pyDOE2/doe_composite.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | from pyDOE2.doe_factorial import ff2n 18 | from pyDOE2.doe_star import star 19 | from pyDOE2.doe_union import union 20 | from pyDOE2.doe_repeat_center import repeat_center 21 | 22 | __all__ = ['ccdesign'] 23 | 24 | def ccdesign(n, center=(4, 4), alpha='orthogonal', face='circumscribed'): 25 | """ 26 | Central composite design 27 | 28 | Parameters 29 | ---------- 30 | n : int 31 | The number of factors in the design. 32 | 33 | Optional 34 | -------- 35 | center : int array 36 | A 1-by-2 array of integers, the number of center points in each block 37 | of the design. (Default: (4, 4)). 38 | alpha : str 39 | A string describing the effect of alpha has on the variance. ``alpha`` 40 | can take on the following values: 41 | 42 | 1. 'orthogonal' or 'o' (Default) 43 | 44 | 2. 'rotatable' or 'r' 45 | 46 | face : str 47 | The relation between the start points and the corner (factorial) points. 48 | There are three options for this input: 49 | 50 | 1. 'circumscribed' or 'ccc': This is the original form of the central 51 | composite design. The star points are at some distance ``alpha`` 52 | from the center, based on the properties desired for the design. 53 | The start points establish new extremes for the low and high 54 | settings for all factors. These designs have circular, spherical, 55 | or hyperspherical symmetry and require 5 levels for each factor. 56 | Augmenting an existing factorial or resolution V fractional 57 | factorial design with star points can produce this design. 58 | 59 | 2. 'inscribed' or 'cci': For those situations in which the limits 60 | specified for factor settings are truly limits, the CCI design 61 | uses the factors settings as the star points and creates a factorial 62 | or fractional factorial design within those limits (in other words, 63 | a CCI design is a scaled down CCC design with each factor level of 64 | the CCC design divided by ``alpha`` to generate the CCI design). 65 | This design also requires 5 levels of each factor. 66 | 67 | 3. 'faced' or 'ccf': In this design, the star points are at the center 68 | of each face of the factorial space, so ``alpha`` = 1. This 69 | variety requires 3 levels of each factor. Augmenting an existing 70 | factorial or resolution V design with appropriate star points can 71 | also produce this design. 72 | 73 | Notes 74 | ----- 75 | - Fractional factorial designs are not (yet) available here. 76 | - 'ccc' and 'cci' can be rotatable design, but 'ccf' cannot. 77 | - If ``face`` is specified, while ``alpha`` is not, then the default value 78 | of ``alpha`` is 'orthogonal'. 79 | 80 | Returns 81 | ------- 82 | mat : 2d-array 83 | The design matrix with coded levels -1 and 1 84 | 85 | Example 86 | ------- 87 | :: 88 | 89 | >>> ccdesign(3) 90 | array([[-1. , -1. , -1. ], 91 | [ 1. , -1. , -1. ], 92 | [-1. , 1. , -1. ], 93 | [ 1. , 1. , -1. ], 94 | [-1. , -1. , 1. ], 95 | [ 1. , -1. , 1. ], 96 | [-1. , 1. , 1. ], 97 | [ 1. , 1. , 1. ], 98 | [ 0. , 0. , 0. ], 99 | [ 0. , 0. , 0. ], 100 | [ 0. , 0. , 0. ], 101 | [ 0. , 0. , 0. ], 102 | [-1.82574186, 0. , 0. ], 103 | [ 1.82574186, 0. , 0. ], 104 | [ 0. , -1.82574186, 0. ], 105 | [ 0. , 1.82574186, 0. ], 106 | [ 0. , 0. , -1.82574186], 107 | [ 0. , 0. , 1.82574186], 108 | [ 0. , 0. , 0. ], 109 | [ 0. , 0. , 0. ], 110 | [ 0. , 0. , 0. ], 111 | [ 0. , 0. , 0. ]]) 112 | 113 | 114 | """ 115 | # Check inputs 116 | assert isinstance(n, int) and n>1, '"n" must be an integer greater than 1.' 117 | assert alpha.lower() in ('orthogonal', 'o', 'rotatable', 118 | 'r'), 'Invalid value for "alpha": {:}'.format(alpha) 119 | assert face.lower() in ('circumscribed', 'ccc', 'inscribed', 'cci', 120 | 'faced', 'ccf'), 'Invalid value for "face": {:}'.format(face) 121 | 122 | try: 123 | nc = len(center) 124 | except: 125 | raise TypeError('Invalid value for "center": {:}. Expected a 1-by-2 array.'.format(center)) 126 | else: 127 | if nc!=2: 128 | raise ValueError('Invalid number of values for "center" (expected 2, but got {:})'.format(nc)) 129 | 130 | # Orthogonal Design 131 | if alpha.lower() in ('orthogonal', 'o'): 132 | H2, a = star(n, alpha='orthogonal', center=center) 133 | 134 | # Rotatable Design 135 | if alpha.lower() in ('rotatable', 'r'): 136 | H2, a = star(n, alpha='rotatable') 137 | 138 | # Inscribed CCD 139 | if face.lower() in ('inscribed', 'cci'): 140 | H1 = ff2n(n) 141 | H1 = H1/a # Scale down the factorial points 142 | H2, a = star(n) 143 | 144 | # Faced CCD 145 | if face.lower() in ('faced', 'ccf'): 146 | H2, a = star(n) # Value of alpha is always 1 in Faced CCD 147 | H1 = ff2n(n) 148 | 149 | # Circumscribed CCD 150 | if face.lower() in ('circumscribed', 'ccc'): 151 | H1 = ff2n(n) 152 | 153 | C1 = repeat_center(n, center[0]) 154 | C2 = repeat_center(n, center[1]) 155 | 156 | H1 = union(H1, C1) 157 | H2 = union(H2, C2) 158 | H = union(H1, H2) 159 | 160 | return H 161 | -------------------------------------------------------------------------------- /pyDOE2/doe_fold.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | __all__ = ['fold'] 19 | 20 | def fold(H, columns=None): 21 | """ 22 | Fold a design to reduce confounding effects. 23 | 24 | Parameters 25 | ---------- 26 | H : 2d-array 27 | The design matrix to be folded. 28 | columns : array 29 | Indices of of columns to fold (Default: None). If ``columns=None`` is 30 | used, then all columns will be folded. 31 | 32 | Returns 33 | ------- 34 | Hf : 2d-array 35 | The folded design matrix. 36 | 37 | Examples 38 | -------- 39 | :: 40 | 41 | """ 42 | H = np.array(H) 43 | assert len(H.shape)==2, 'Input design matrix must be 2d.' 44 | 45 | if columns is None: 46 | columns = range(H.shape[1]) 47 | 48 | Hf = H.copy() 49 | 50 | for col in columns: 51 | vals = np.unique(H[:, col]) 52 | assert len(vals)==2, 'Input design matrix must be 2-level factors only.' 53 | 54 | for i in range(H.shape[0]): 55 | Hf[i, col] = vals[0] if H[i, col]==vals[1] else vals[1] 56 | 57 | Hf = np.vstack((H, Hf)) 58 | 59 | return Hf 60 | 61 | 62 | -------------------------------------------------------------------------------- /pyDOE2/doe_gsd.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (C) 2018 - Rickard Sjoegren 3 | """ 4 | import itertools 5 | 6 | import numpy as np 7 | 8 | 9 | def gsd(levels, reduction, n=1): 10 | """ 11 | Create a Generalized Subset Design (GSD). 12 | 13 | Parameters 14 | ---------- 15 | levels : array-like 16 | Number of factor levels per factor in design. 17 | reduction : int 18 | Reduction factor (bigger than 1). Larger `reduction` means fewer 19 | experiments in the design and more possible complementary designs. 20 | n : int 21 | Number of complementary GSD-designs (default 1). The complementary 22 | designs are balanced analogous to fold-over in two-level fractional 23 | factorial designs. 24 | 25 | Returns 26 | ------- 27 | H : 2d-array | list of 2d-arrays 28 | `n` m-by-k matrices where k is the number of factors (equal 29 | to the length of `factor_levels`. The number of rows, m, will 30 | be approximately equal to the grand product of the factor levels 31 | divided by `reduction`. 32 | 33 | Raises 34 | ------ 35 | ValueError 36 | If input is valid or if design construction fails. Design can fail 37 | if `reduction` is too large compared to values of `levels`. 38 | 39 | Notes 40 | ----- 41 | The Generalized Subset Design (GSD) [1]_ or generalized factorial design is 42 | a generalization of traditional fractional factorial designs to problems 43 | where factors can have more than two levels. 44 | 45 | In many application problems factors can have categorical or quantitative 46 | factors on more than two levels. Previous reduced designs have not been 47 | able to deal with such types of problems. Full multi-level factorial 48 | designs can handle such problems but are however not economical regarding 49 | the number of experiments. 50 | 51 | Note for commercial users, the application of GSD to testing of product 52 | characteristics in a processing facility is patented [2]_ 53 | 54 | Examples 55 | -------- 56 | An example with three factors using three, four and 57 | six levels respectively reduced with a factor 4 :: 58 | 59 | >>> gsd([3, 4, 6], 4) 60 | array([[0, 0, 0], 61 | [0, 0, 4], 62 | [0, 1, 1], 63 | [0, 1, 5], 64 | [0, 2, 2], 65 | [0, 3, 3], 66 | [1, 0, 1], 67 | [1, 0, 5], 68 | [1, 1, 2], 69 | [1, 2, 3], 70 | [1, 3, 0], 71 | [1, 3, 4], 72 | [2, 0, 2], 73 | [2, 1, 3], 74 | [2, 2, 0], 75 | [2, 2, 4], 76 | [2, 3, 1], 77 | [2, 3, 5]]) 78 | 79 | Two complementary designs with two factors using three and 80 | four levels reduced with a factor 2 :: 81 | 82 | >>> gsd([3, 4], 2, n=2)[0] 83 | array([[0, 0], 84 | [0, 2], 85 | [2, 0], 86 | [2, 2], 87 | [1, 1], 88 | [1, 3]]) 89 | >>> gsd([3, 4], 2, n=2)[1] 90 | array([[0, 1], 91 | [0, 3], 92 | [2, 1], 93 | [2, 3], 94 | [1, 0], 95 | [1, 2]]) 96 | 97 | If design fails ValueError is raised :: 98 | 99 | >>> gsd([2, 3], 5) 100 | Traceback (most recent call last): 101 | ... 102 | ValueError: reduction too large compared to factor levels 103 | 104 | References 105 | ---------- 106 | .. [1] Surowiec, Izabella, Ludvig Vikstrom, Gustaf Hector, Erik Johansson, 107 | Conny Vikstrom, and Johan Trygg. "Generalized Subset Designs in 108 | Analytical Chemistry." Analytical Chemistry 89, no. 12 (June 20, 2017): 109 | 6491-97. https://doi.org/10.1021/acs.analchem.7b00506. 110 | 111 | .. [2] Vikstrom, Ludvig, Conny Vikstrom, Erik Johansson, and Gustaf Hector. 112 | Computer-implemented systems and methods for generating 113 | generalized fractional designs. US9746850 B2, filed May 9, 114 | 2014, and issued August 29, 2017. http://www.google.se/patents/US9746850. 115 | 116 | """ 117 | try: 118 | assert all(isinstance(v, int) for v in levels), \ 119 | 'levels has to be sequence of integers' 120 | assert isinstance(reduction, int) and reduction > 1, \ 121 | 'reduction has to be integer larger than 1' 122 | assert isinstance(n, int) and n > 0, \ 123 | 'n has to be positive integer' 124 | except AssertionError as e: 125 | raise ValueError(e) 126 | 127 | partitions = _make_partitions(levels, reduction) 128 | latin_square = _make_latin_square(reduction) 129 | ortogonal_arrays = _make_orthogonal_arrays(latin_square, len(levels)) 130 | 131 | try: 132 | designs = [_map_partitions_to_design(partitions, oa) - 1 for oa in 133 | ortogonal_arrays] 134 | except ValueError: 135 | raise ValueError('reduction too large compared to factor levels') 136 | 137 | if n == 1: 138 | return designs[0] 139 | else: 140 | return designs[:n] 141 | 142 | 143 | def _make_orthogonal_arrays(latin_square, n_cols): 144 | """ 145 | Augment latin-square to the specified number of columns to produce 146 | an orthogonal array. 147 | """ 148 | p = len(latin_square) 149 | 150 | first_row = latin_square[0] 151 | A_matrices = [np.array([[v]]) for v in first_row] 152 | 153 | while A_matrices[0].shape[1] < n_cols: 154 | new_A_matrices = list() 155 | 156 | for i, A_matrix in enumerate(A_matrices): 157 | sub_a = list() 158 | for constant, other_A in zip(first_row, 159 | np.array(A_matrices)[latin_square[i]]): 160 | constant_vec = np.repeat(constant, len(other_A))[:, np.newaxis] 161 | combined = np.hstack([constant_vec, other_A]) 162 | sub_a.append(combined) 163 | 164 | new_A_matrices.append(np.vstack(sub_a)) 165 | 166 | A_matrices = new_A_matrices 167 | 168 | if A_matrices[0].shape[1] == n_cols: 169 | break 170 | 171 | return A_matrices 172 | 173 | 174 | def _map_partitions_to_design(partitions, ortogonal_array): 175 | """ 176 | Map partitioned factor to final design using orthogonal-array produced 177 | by augmenting latin square. 178 | """ 179 | assert len( 180 | partitions) == ortogonal_array.max() + 1 and ortogonal_array.min() == 0, \ 181 | 'Orthogonal array indexing does not match partition structure' 182 | 183 | mappings = list() 184 | for row in ortogonal_array: 185 | if any(not partitions[p][factor] for factor, p in enumerate(row)): 186 | continue 187 | 188 | partition_sets = [partitions[p][factor] for factor, p in enumerate(row)] 189 | mapping = list(itertools.product(*partition_sets)) 190 | mappings.append(mapping) 191 | 192 | return np.vstack(mappings) 193 | 194 | 195 | def _make_partitions(factor_levels, num_partitions): 196 | """ 197 | Balanced partitioning of factors. 198 | """ 199 | partitions = list() 200 | for partition_i in range(1, num_partitions + 1): 201 | partition = list() 202 | 203 | for num_levels in factor_levels: 204 | part = list() 205 | for level_i in range(1, num_levels): 206 | index = partition_i + (level_i - 1) * num_partitions 207 | if index <= num_levels: 208 | part.append(index) 209 | 210 | partition.append(part) 211 | 212 | partitions.append(partition) 213 | 214 | return partitions 215 | 216 | 217 | def _make_latin_square(n): 218 | numbers = np.arange(n) 219 | latin_square = np.vstack([np.roll(numbers, -i) for i in range(n)]) 220 | return latin_square 221 | -------------------------------------------------------------------------------- /pyDOE2/doe_lhs.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | from scipy import spatial 18 | from scipy import stats 19 | from scipy import linalg 20 | from numpy import ma 21 | 22 | __all__ = ['lhs'] 23 | 24 | 25 | def lhs(n, samples=None, criterion=None, iterations=None, random_state=None, correlation_matrix = None): 26 | """ 27 | Generate a latin-hypercube design 28 | 29 | Parameters 30 | ---------- 31 | n : int 32 | The number of factors to generate samples for 33 | 34 | Optional 35 | -------- 36 | samples : int 37 | The number of samples to generate for each factor (Default: n) 38 | criterion : str 39 | Allowable values are "center" or "c", "maximin" or "m", 40 | "centermaximin" or "cm", and "correlation" or "corr". If no value 41 | given, the design is simply randomized. 42 | iterations : int 43 | The number of iterations in the maximin and correlations algorithms 44 | (Default: 5). 45 | randomstate : np.random.RandomState, int 46 | Random state (or seed-number) which controls the seed and random draws 47 | correlation_matrix : ndarray 48 | Enforce correlation between factors (only used in lhsmu) 49 | 50 | Returns 51 | ------- 52 | H : 2d-array 53 | An n-by-samples design matrix that has been normalized so factor values 54 | are uniformly spaced between zero and one. 55 | 56 | Example 57 | ------- 58 | A 3-factor design (defaults to 3 samples):: 59 | 60 | >>> lhs(3, random_state=42) 61 | array([[ 0.12484671, 0.95539205, 0.24399798], 62 | [ 0.53288616, 0.38533955, 0.86703834], 63 | [ 0.68602787, 0.31690477, 0.38533151]]) 64 | 65 | A 4-factor design with 6 samples:: 66 | 67 | >>> lhs(4, samples=6, random_state=42) 68 | array([[ 0.06242335, 0.19266575, 0.88202411, 0.89439364], 69 | [ 0.19266977, 0.53538985, 0.53030416, 0.49498498], 70 | [ 0.71737371, 0.75412607, 0.17634727, 0.71520486], 71 | [ 0.63874044, 0.85658231, 0.33676408, 0.31102936], 72 | [ 0.43351917, 0.45134543, 0.12199899, 0.53056742], 73 | [ 0.93530882, 0.15845238, 0.7386575 , 0.09977641]]) 74 | 75 | A 2-factor design with 5 centered samples:: 76 | 77 | >>> lhs(2, samples=5, criterion='center', random_state=42) 78 | array([[ 0.1, 0.9], 79 | [ 0.5, 0.5], 80 | [ 0.7, 0.1], 81 | [ 0.3, 0.7], 82 | [ 0.9, 0.3]]) 83 | 84 | A 3-factor design with 4 samples where the minimum distance between 85 | all samples has been maximized:: 86 | 87 | >>> lhs(3, samples=4, criterion='maximin', random_state=42) 88 | array([[ 0.69754389, 0.2997106 , 0.96250964], 89 | [ 0.10585037, 0.09872038, 0.73157522], 90 | [ 0.25351996, 0.65148999, 0.07337204], 91 | [ 0.91276926, 0.97873992, 0.42783549]]) 92 | 93 | A 4-factor design with 5 samples where the samples are as uncorrelated 94 | as possible (within 10 iterations):: 95 | 96 | >>> lhs(4, samples=5, criterion='correlation', iterations=10, random_state=42) 97 | array([[ 0.72088348, 0.05121366, 0.97609357, 0.92487081], 98 | [ 0.49507404, 0.51265511, 0.00808672, 0.37915272], 99 | [ 0.22217816, 0.2878673 , 0.24034384, 0.42786629], 100 | [ 0.91977309, 0.93895699, 0.64061224, 0.14213258], 101 | [ 0.04719698, 0.70796822, 0.53910322, 0.78857071]]) 102 | 103 | """ 104 | H = None 105 | 106 | if random_state is None: 107 | random_state = np.random.RandomState() 108 | elif not isinstance(random_state, np.random.RandomState): 109 | random_state = np.random.RandomState(random_state) 110 | 111 | if samples is None: 112 | samples = n 113 | 114 | if criterion is not None: 115 | if not criterion.lower() in ('center', 'c', 'maximin', 'm', 116 | 'centermaximin', 'cm', 'correlation', 117 | 'corr','lhsmu'): 118 | raise ValueError('Invalid value for "criterion": {}'.format(criterion)) 119 | 120 | else: 121 | H = _lhsclassic(n, samples, random_state) 122 | 123 | if criterion is None: 124 | criterion = 'center' 125 | if iterations is None: 126 | iterations = 5 127 | 128 | if H is None: 129 | if criterion.lower() in ('center', 'c'): 130 | H = _lhscentered(n, samples, random_state) 131 | elif criterion.lower() in ('maximin', 'm'): 132 | H = _lhsmaximin(n, samples, iterations, 'maximin', random_state) 133 | elif criterion.lower() in ('centermaximin', 'cm'): 134 | H = _lhsmaximin(n, samples, iterations, 'centermaximin', random_state) 135 | elif criterion.lower() in ('correlation', 'corr'): 136 | H = _lhscorrelate(n, samples, iterations, random_state) 137 | elif criterion.lower() in ('lhsmu'): 138 | # as specified by the paper. M is set to 5 139 | H = _lhsmu(n, samples, correlation_matrix, random_state, M=5) 140 | 141 | return H 142 | 143 | ################################################################################ 144 | 145 | def _lhsclassic(n, samples, randomstate): 146 | # Generate the intervals 147 | cut = np.linspace(0, 1, samples + 1) 148 | 149 | # Fill points uniformly in each interval 150 | u = randomstate.rand(samples, n) 151 | a = cut[:samples] 152 | b = cut[1:samples + 1] 153 | rdpoints = np.zeros_like(u) 154 | for j in range(n): 155 | rdpoints[:, j] = u[:, j]*(b-a) + a 156 | 157 | # Make the random pairings 158 | H = np.zeros_like(rdpoints) 159 | for j in range(n): 160 | order = randomstate.permutation(range(samples)) 161 | H[:, j] = rdpoints[order, j] 162 | 163 | return H 164 | 165 | ################################################################################ 166 | 167 | def _lhscentered(n, samples, randomstate): 168 | # Generate the intervals 169 | cut = np.linspace(0, 1, samples + 1) 170 | 171 | # Fill points uniformly in each interval 172 | u = randomstate.rand(samples, n) 173 | a = cut[:samples] 174 | b = cut[1:samples + 1] 175 | _center = (a + b)/2 176 | 177 | # Make the random pairings 178 | H = np.zeros_like(u) 179 | for j in range(n): 180 | H[:, j] = randomstate.permutation(_center) 181 | 182 | return H 183 | 184 | ################################################################################ 185 | 186 | def _lhsmaximin(n, samples, iterations, lhstype, randomstate): 187 | maxdist = 0 188 | 189 | # Maximize the minimum distance between points 190 | for i in range(iterations): 191 | if lhstype=='maximin': 192 | Hcandidate = _lhsclassic(n, samples, randomstate) 193 | else: 194 | Hcandidate = _lhscentered(n, samples, randomstate) 195 | 196 | d = spatial.distance.pdist(Hcandidate, 'euclidean') 197 | if maxdist>> pbdesign(3) 44 | array([[-1., -1., 1.], 45 | [ 1., -1., -1.], 46 | [-1., 1., -1.], 47 | [ 1., 1., 1.]]) 48 | 49 | A 5-factor design:: 50 | 51 | >>> pbdesign(5) 52 | array([[-1., -1., 1., -1., 1.], 53 | [ 1., -1., -1., -1., -1.], 54 | [-1., 1., -1., -1., 1.], 55 | [ 1., 1., 1., -1., -1.], 56 | [-1., -1., 1., 1., -1.], 57 | [ 1., -1., -1., 1., 1.], 58 | [-1., 1., -1., 1., -1.], 59 | [ 1., 1., 1., 1., 1.]]) 60 | 61 | """ 62 | assert n>0, 'Number of factors must be a positive integer' 63 | keep = int(n) 64 | n = 4*(int(n/4) + 1) # calculate the correct number of rows (multiple of 4) 65 | f, e = np.frexp([n, n/12., n/20.]) 66 | k = [idx for idx, val in enumerate(np.logical_and(f==0.5, e>0)) if val] 67 | 68 | assert isinstance(n, int) and k!=[], 'Invalid inputs. n must be a multiple of 4.' 69 | 70 | k = k[0] 71 | e = e[k] - 1 72 | 73 | if k==0: # N = 1*2**e 74 | H = np.ones((1, 1)) 75 | elif k==1: # N = 12*2**e 76 | H = np.vstack((np.ones((1, 12)), np.hstack((np.ones((11, 1)), 77 | toeplitz([-1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1], 78 | [-1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1]))))) 79 | elif k==2: # N = 20*2**e 80 | H = np.vstack((np.ones((1, 20)), np.hstack((np.ones((19, 1)), 81 | hankel( 82 | [-1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1], 83 | [1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1]) 84 | )))) 85 | 86 | # Kronecker product construction 87 | for i in range(e): 88 | H = np.vstack((np.hstack((H, H)), np.hstack((H, -H)))) 89 | 90 | # Reduce the size of the matrix as needed 91 | H = H[:, 1:(keep + 1)] 92 | 93 | return np.flipud(H) 94 | 95 | 96 | -------------------------------------------------------------------------------- /pyDOE2/doe_repeat_center.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | def repeat_center(n, repeat): 19 | """ 20 | Create the center-point portion of a design matrix 21 | 22 | Parameters 23 | ---------- 24 | n : int 25 | The number of factors in the original design 26 | repeat : int 27 | The number of center points to repeat 28 | 29 | Returns 30 | ------- 31 | mat : 2d-array 32 | The center-point portion of a design matrix (elements all zero). 33 | 34 | Example 35 | ------- 36 | :: 37 | 38 | >>> repeat_center(3, 2) 39 | array([[ 0., 0., 0.], 40 | [ 0., 0., 0.]]) 41 | 42 | """ 43 | return np.zeros((repeat, n)) 44 | -------------------------------------------------------------------------------- /pyDOE2/doe_star.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | def star(n, alpha='faced', center=(1, 1)): 19 | """ 20 | Create the star points of various design matrices 21 | 22 | Parameters 23 | ---------- 24 | n : int 25 | The number of variables in the design 26 | 27 | Optional 28 | -------- 29 | alpha : str 30 | Available values are 'faced' (default), 'orthogonal', or 'rotatable' 31 | center : array 32 | A 1-by-2 array of integers indicating the number of center points 33 | assigned in each block of the response surface design. Default is 34 | (1, 1). 35 | 36 | Returns 37 | ------- 38 | H : 2d-array 39 | The star-point portion of the design matrix (i.e. at +/- alpha) 40 | a : scalar 41 | The alpha value to scale the star points with. 42 | 43 | Example 44 | ------- 45 | :: 46 | 47 | >>> star(3) 48 | array([[-1., 0., 0.], 49 | [ 1., 0., 0.], 50 | [ 0., -1., 0.], 51 | [ 0., 1., 0.], 52 | [ 0., 0., -1.], 53 | [ 0., 0., 1.]]) 54 | 55 | """ 56 | # Star points at the center of each face of the factorial 57 | if alpha=='faced': 58 | a = 1 59 | elif alpha=='orthogonal': 60 | nc = 2**n # factorial points 61 | nco = center[0] # center points to factorial 62 | na = 2*n # axial points 63 | nao = center[1] # center points to axial design 64 | # value of alpha in orthogonal design 65 | a = (n*(1 + nao/float(na))/(1 + nco/float(nc)))**0.5 66 | elif alpha=='rotatable': 67 | nc = 2**n # number of factorial points 68 | a = nc**(0.25) # value of alpha in rotatable design 69 | else: 70 | raise ValueError('Invalid value for "alpha": {:}'.format(alpha)) 71 | 72 | # Create the actual matrix now. 73 | H = np.zeros((2*n, n)) 74 | for i in range(n): 75 | H[2*i:2*i+2, i] = [-1, 1] 76 | 77 | H *= a 78 | 79 | return H, a 80 | -------------------------------------------------------------------------------- /pyDOE2/doe_union.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | def union(H1, H2): 19 | """ 20 | Join two matrices by stacking them on top of each other. 21 | 22 | Parameters 23 | ---------- 24 | H1 : 2d-array 25 | The matrix that goes on top of the new matrix 26 | H2 : 2d-array 27 | The matrix that goes on bottom of the new matrix 28 | 29 | Returns 30 | ------- 31 | mat : 2d-array 32 | The new matrix that contains the rows of ``H1`` on top of the rows of 33 | ``H2``. 34 | 35 | Example 36 | ------- 37 | :: 38 | 39 | >>> union(np.eye(2), -np.eye(2)) 40 | array([[ 1., 0.], 41 | [ 0., 1.], 42 | [-1., 0.], 43 | [ 0., -1.]]) 44 | 45 | """ 46 | H = np.r_[H1, H2] 47 | return H 48 | -------------------------------------------------------------------------------- /pyDOE2/var_regression_matrix.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code was originally published by the following individuals for use with 3 | Scilab: 4 | Copyright (C) 2012 - 2013 - Michael Baudin 5 | Copyright (C) 2012 - Maria Christopoulou 6 | Copyright (C) 2010 - 2011 - INRIA - Michael Baudin 7 | Copyright (C) 2009 - Yann Collette 8 | Copyright (C) 2009 - CEA - Jean-Marc Martinez 9 | 10 | website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros 11 | 12 | Much thanks goes to these individuals. It has been converted to Python by 13 | Abraham Lee. 14 | """ 15 | 16 | import numpy as np 17 | 18 | def var_regression_matrix(H, x, model, sigma=1): 19 | """ 20 | Compute the variance of the 'regression error'. 21 | 22 | Parameters 23 | ---------- 24 | H : 2d-array 25 | The regression matrix 26 | x : 2d-array 27 | The coordinates to calculate the regression error variance at. 28 | model : str 29 | A string of tokens that define the regression model (e.g. 30 | '1 x1 x2 x1*x2') 31 | sigma : scalar 32 | An estimate of the variance (default: 1). 33 | 34 | Returns 35 | ------- 36 | var : scalar 37 | The variance of the regression error, evaluated at ``x``. 38 | 39 | """ 40 | x = np.atleast_2d(x) 41 | H = np.atleast_2d(H) 42 | 43 | if x.shape[0]==1: 44 | x = x.T 45 | 46 | if np.rank(H)<(np.dot(H.T, H)).shape[0]: 47 | raise ValueError("model and DOE don't suit together") 48 | 49 | x_mod = build_regression_matrix(x, model) 50 | var = sigma**2*np.dot(np.dot(x_mod.T, np.linalg.inv(np.dot(H.T, H))), x_mod) 51 | return var 52 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from io import open 2 | from setuptools import setup 3 | 4 | def read(fname, encoding='utf-8'): 5 | with open(fname, encoding=encoding) as f: 6 | return f.read() 7 | 8 | setup( 9 | name='pyDOE2', 10 | version="1.2.1", 11 | author='Rickard Sjoegren', 12 | author_email='r.sjogren89@gmail.com', 13 | description='Design of experiments for Python', 14 | url='https://github.com/clicumu/pyDOE2', 15 | license='BSD License (3-Clause)', 16 | long_description=read('README.md'), 17 | long_description_content_type='text/markdown', 18 | packages=['pyDOE2'], 19 | install_requires=['numpy', 'scipy'], 20 | keywords=[ 21 | 'DOE', 22 | 'design of experiments', 23 | 'experimental design', 24 | 'optimization', 25 | 'statistics', 26 | 'python' 27 | ], 28 | classifiers=[ 29 | 'Development Status :: 5 - Production/Stable', 30 | 'Intended Audience :: Education', 31 | 'Intended Audience :: Science/Research', 32 | 'License :: OSI Approved :: BSD License', 33 | 'Operating System :: OS Independent', 34 | 'Programming Language :: Python', 35 | 'Programming Language :: Python :: 2.7', 36 | 'Programming Language :: Python :: 3.2', 37 | 'Programming Language :: Python :: 3.3', 38 | 'Programming Language :: Python :: 3.4', 39 | 'Programming Language :: Python :: 3.5', 40 | 'Programming Language :: Python :: 3.6', 41 | 'Topic :: Education', 42 | 'Topic :: Scientific/Engineering', 43 | 'Topic :: Scientific/Engineering :: Mathematics', 44 | 'Topic :: Scientific/Engineering :: Physics', 45 | 'Topic :: Software Development', 46 | 'Topic :: Software Development :: Libraries', 47 | 'Topic :: Software Development :: Libraries :: Python Modules', 48 | 'Topic :: Utilities' 49 | ] 50 | ) 51 | 52 | --------------------------------------------------------------------------------