DOE Utilities
Overview
Use drcutils.doe.generate_doe to create and summarize full factorial,
Latin hypercube, and fractional 2-level designs.
Quick Start
from drcutils.doe import generate_doe
result = generate_doe(
kind="lhs",
factors={"temperature": (20.0, 80.0), "pressure": (1.0, 3.0)},
n_samples=12,
seed=42,
randomize=True,
)
design = result["design"]
print(result["summary"])
print(result["interpretation"])
Optional Extras
For larger fractional factorial workflows, install optional DOE support:
pip install drcutils[doe]
CLI
drc-doe --kind lhs --factors-json '{"temperature": [20, 80], "pressure": [1, 3]}' --n-samples 12 --out artifacts/doe.csv
API Reference
High-level DOE generation workflows.
- drcutils.doe.generate.generate_doe(*, kind, factors, n_samples=None, seed=0, center_points=0, replicates=1, randomize=True)[source]
Generate and summarize a DOE table.
- Parameters:
kind – Design kind:
full,lhs, orfrac2.factors – Factor specification map.
n_samples – Number of samples for LHS.
seed – Random seed.
center_points – Number of center points to append.
replicates – Number of full design replicates.
randomize – Whether to randomize run order.
- Returns:
Structured dictionary with design, summary, interpretation, and warnings.