🤖 AI Summary
Traditional space-filling experimental designs—e.g., Latin Hypercube Sampling (LHS)—fail for complex simulation models featuring optional and nested hierarchical inputs. To address this, we propose *raxpy*, the first open-source Python toolkit supporting optional and hierarchical inputs. Its core comprises an automatic parsing mechanism leveraging Python type annotations and runtime introspection, tightly integrated with an enhanced hierarchical Latin hypercube sampling algorithm. This enables generation of experimental designs with high input-space coverage and sample uniformity, while natively supporting multiprocessing and distributed execution. Numerical experiments demonstrate that *raxpy* significantly outperforms baseline methods in both coverage and uniformity (p < 0.01). Released under the MIT license, *raxpy* has been successfully integrated into multiple industrial-scale simulation workflows.
📝 Abstract
Space-filling experimental design techniques are commonly used in many computer modeling and simulation studies to explore the effects of inputs on outputs. This research presents raxpy, a Python package that leverages expressive annotation of Python functions and classes to simplify space-filling experimentation. It incorporates code introspection to derive a Python function's input space and novel algorithms to automate the design of space-filling experiments for spaces with optional and hierarchical input dimensions. In this paper, we review the criteria for design evaluation given these types of dimensions and compare the proposed algorithms with numerical experiments. The results demonstrate the ability of the proposed algorithms to create improved space-filling experiment designs. The package includes support for parallelism and distributed execution. raxpy is available as free and open-source software under a MIT license.