Skip to content

SelfExplainML/PyUniDOE

 
 

Repository files navigation

pyUniDOE

Build Status

Installation

  • Enviroment:
    • Python 3
    • C++ compiler
    • swig 3

Assume you have figured out the above environment, the most convenient way for installation is via the pip command.

pip install git+https://github.com/SelfExplainML/pyunidoe.git

More details can be found in documentation.

Examples

Evaluate existing designs

x = np.array([[1, 2],
              [3, 3],
              [2, 1]])
pydoe.design_eval(x,crit="CD2")

Get an existing design from database

import numpy as np 
import pyunidoe as pydoe

pydoe.design_query(n=12, s=4, q=6, crit="CD2", show_crit=True)

Generate uniform design from random initialization

stat=pydoe.gen_ud(n=12, s=4, q=6, init="rand", crit="CD2", maxiter=100, vis=True)
print("The initial design: ")
print(stat["initial_design"])

print("The final design: ")
print(stat["final_design"])

Augment uniform design (Runs)

stat = pydoe.gen_aud(xp=x1, n=24, s=4, q=6, crit="CD2", maxiter=100, vis=True)
print("The initial design: ")
print(stat["initial_design"])

print("The final design: ")
print(stat["final_design"])

Augment uniform design (Factors)

stat = pydoe.gen_aud_col(xp=x1, n=12, s=5, q=6, crit="CD2", maxiter=100, vis=True)
print("The initial design: ")
print(stat["initial_design"])

print("The final design: ")
print(stat["final_design"])

Multi-shoot Strategy

x1_multi = pydoe.gen_ud_ms(n=12, s=4, q=6, crit="CD2", maxiter=100, nshoot=1000, n_jobs=10, vis=False)
print(pydoe.design_eval(x1_multi,crit="CD2"))

x2_multi = pydoe.gen_aud_ms(x1_multi, n=24, s=4, q=6, crit="CD2", maxiter=100, nshoot=1000, n_jobs=10, vis=False)
print(pydoe.design_eval(x2_multi,crit="CD2"))

x3_multi = pydoe.gen_aud_col_ms(x1_multi, n=12, s=5, q=6, crit="CD2", maxiter=100, nshoot=1000, n_jobs=10, vis=False)
print(pydoe.design_eval(x3_multi,crit="CD2"))

More examples can be referred to the documentation

Contact:

If you find any bugs or have any suggestions, please contact us via email: [email protected] or [email protected].

About

Python Package for Generating Uniform Designs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.3%
  • Python 8.6%
  • Other 0.1%