Skip to content

Add fracfact by resolution #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
build
MANIFEST
*.egg-info
.idea
115 changes: 0 additions & 115 deletions README

This file was deleted.

88 changes: 88 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
pyDOE2: An experimental design package for python
=====================================================

`pyDOE2` is a fork of the [`pyDOE`](https://github.com/tisimst/pyDOE) package
that is designed to help the scientist, engineer, statistician, etc., to
construct appropriate experimental designs.

This fork came to life to solve bugs and issues that remained unsolved in the
original package.

Capabilities
------------

The package currently includes functions for creating designs for any
number of factors:

- Factorial Designs
- General Full-Factorial (``fullfact``)
- 2-level Full-Factorial (``ff2n``)
- 2-level Fractional Factorial (``fracfact``)
- Plackett-Burman (``pbdesign``)
- Response-Surface Designs
- Box-Behnken (``bbdesign``)
- Central-Composite (``ccdesign``)
- Randomized Designs
- Latin-Hypercube (``lhs``)

See the original [package homepage](http://pythonhosted.org/pyDOE) for details
on usage and other notes.

Requirements
------------

- NumPy
- SciPy

Installation and download
-------------------------

Through pip:

```
pip install pyDOE2
```


Credits
-------

`pyDOE` was originally published by the following individuals for use with
Scilab:

- Copyright (C) 2012 - 2013 - Michael Baudin
- Copyright (C) 2012 - Maria Christopoulou
- Copyright (C) 2010 - 2011 - INRIA - Michael Baudin
- Copyright (C) 2009 - Yann Collette
- Copyright (C) 2009 - CEA - Jean-Marc Martinez

- Website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros

Much thanks goes to these individuals.

And thanks goes out to the following for finding and offering solutions for
bugs:

- Ashmeet Singh

And thanks to the following individuals for forking and working with `pyDOE2`:

- Copyright (C) 2018 - Rickard Sjögren and Daniel Svensson


License
-------

This package is provided under two licenses:

1. The *BSD License* (3-clause)
2. Any other that the author approves (just ask!)

References
----------

- [Factorial designs](http://en.wikipedia.org/wiki/Factorial_experiment)
- [Plackett-Burman designs](http://en.wikipedia.org/wiki/Plackett-Burman_design)
- [Box-Behnken designs](http://en.wikipedia.org/wiki/Box-Behnken_design)
- [Central composite designs](http://en.wikipedia.org/wiki/Central_composite_design)
- [Latin-Hypercube designs](http://en.wikipedia.org/wiki/Latin_hypercube_sampling)
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

sys.path.insert(0, os.path.abspath('..'))

import pyDOE
import pyDOE2

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -43,7 +43,7 @@
master_doc = 'index_TOC'

# General information about the project.
project = u'pyDOE'
project = u'pyDOE2'
if date.today().year!=2013:
copyright = u'2013–%d, Abraham Lee' % date.today().year
else:
Expand All @@ -56,7 +56,7 @@
# The short X.Y version.
version = '1'
# The full version, including alpha/beta/rc tags.
release = pyDOE.__version__
release = pyDOE2.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
21 changes: 21 additions & 0 deletions doc/factorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,27 @@ to the keyword ``columns``::
Care should be taken to decide the appropriate alias structure for
your design and the effects that folding has on it.

2-Level Fractional-Factorial specified by resolution (``fracfact_by_res``)
--------------------------------------------------------------------------

This function constructs a minimal design at given resolution. It does so
by constructing a generator string with a minimal number of base factors
and passes it to ``fracfact``. This approach favors convenience over
fine-grained control over which factors that are confounded.

To construct a 6-factor, resolution III-design, ``fractfact_by_res``
is used like this::

>>> fracfact_by_res(6, 3)
array([[-1., -1., -1., 1., 1., 1.],
[ 1., -1., -1., -1., -1., 1.],
[-1., 1., -1., -1., 1., -1.],
[ 1., 1., -1., 1., -1., -1.],
[-1., -1., 1., 1., -1., -1.],
[ 1., -1., 1., -1., 1., -1.],
[-1., 1., 1., -1., -1., 1.],
[ 1., 1., 1., 1., 1., 1.]])

.. index:: Plackett-Burman

.. _plackett_burman:
Expand Down
64 changes: 32 additions & 32 deletions pyDOE/__init__.py → pyDOE2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
"""
================================================================================
pyDOE: Design of Experiments for Python
================================================================================
This code was originally published by the following individuals for use with
Scilab:
Copyright (C) 2012 - 2013 - Michael Baudin
Copyright (C) 2012 - Maria Christopoulou
Copyright (C) 2010 - 2011 - INRIA - Michael Baudin
Copyright (C) 2009 - Yann Collette
Copyright (C) 2009 - CEA - Jean-Marc Martinez
website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros
Much thanks goes to these individuals. It has been converted to Python by
Abraham Lee.
"""
# from __future__ import absolute_import
__author__ = 'Abraham Lee'
__version__ = '0.3.8'
from pyDOE.doe_box_behnken import *
from pyDOE.doe_composite import *
from pyDOE.doe_factorial import *
from pyDOE.doe_lhs import *
from pyDOE.doe_fold import *
from pyDOE.doe_plackett_burman import *
from pyDOE.var_regression_matrix import *
"""
================================================================================
pyDOE: Design of Experiments for Python
================================================================================

This code was originally published by the following individuals for use with
Scilab:
Copyright (C) 2012 - 2013 - Michael Baudin
Copyright (C) 2012 - Maria Christopoulou
Copyright (C) 2010 - 2011 - INRIA - Michael Baudin
Copyright (C) 2009 - Yann Collette
Copyright (C) 2009 - CEA - Jean-Marc Martinez

website: forge.scilab.org/index.php/p/scidoe/sourcetree/master/macros

Much thanks goes to these individuals. It has been converted to Python by
Abraham Lee.
"""

# from __future__ import absolute_import

__author__ = 'Abraham Lee'
__version__ = '0.3.8'

from pyDOE2.doe_box_behnken import *
from pyDOE2.doe_composite import *
from pyDOE2.doe_factorial import *
from pyDOE2.doe_lhs import *
from pyDOE2.doe_fold import *
from pyDOE2.doe_plackett_burman import *
from pyDOE2.var_regression_matrix import *

Loading