Skip to main content

Space-filling one-factor-at-a-time designs.

Project description

softDOE

softDOE is a Python package for constructing space-filling one-factor-at-a-time (SOFT) designs.

What is included

softDOE currently includes:

  • soft(): generate SOFT designs.
  • measure(): compute screening measures.

Generated designs are returned as NumPy arrays with entries in (0, 1).

Installation

Install softDOE from PyPI:

pip install softDOE

softDOE requires Python 3.9 or later. The package depends on NumPy, SciPy, and pyDOE, and uses a compiled C++ extension built with pybind11.

Quick example

import numpy as np
import softDOE

# SOFT design
design = softDOE.soft(p=10, l=4)

# Friedman function
def friedman(x):
    x = np.asarray(x)
    return (
        10 * np.sin(np.pi * x[0] * x[1])
        + 20 * (x[2] - 0.5) ** 2
        + 10 * x[3]
        + 5 * x[4]
    )

# Evaluate Friedman function at each design point.
y = np.array([friedman(row) for row in design])

# Sensitivity measures
result = softDOE.measure(design, y)

print(result["mustar"])
print(result["t"])

Generating SOFT designs

Use softDOE.soft() to generate a SOFT design:

design = softDOE.soft(p=5, l=4, structure="standard", m=500, seed=123)

Arguments:

  • p: number of factors.
  • l: number of base runs. This value must be even.
  • structure: either "standard" or "strict". The default is "standard".
  • m: number of Monte Carlo samples used when evaluating the design objective.
  • seed: optional seed for reproducible design generation.

The returned design has shape:

(l * (p + 1), p)

Computing screening measures

Use softDOE.measure() with a design matrix and response vector:

result = softDOE.measure(design, y)

The response vector y must have one value for each row of the design. The function returns a dictionary with two entries:

  • mustar: $\mu^*$ measure of Campolongo et al. (2007).
  • t: total Sobol' index of Sobol' (1993).

Testing

After installing the test dependencies, run the test suite with:

python -m pytest

Citation

If you use softDOE, please cite:

@article{yu2026space,
  title={Space-Filling One-Factor-At-A-Time Designs},
  author={Yu, Wei-Yang and Joseph, V Roshan},
  journal={arXiv preprint arXiv:2606.02533},
  year={2026}
}

References

  • Sobol', I. M. (1993), "On sensitivity estimation for nonlinear mathematical models," Mathematical Modeling and Computational Experiments, 1, 407-414.
  • Campolongo, F., Cariboni, J., and Saltelli, A. (2007), "An effective screening design for sensitivity analysis of large models," Environmental Modelling and Software, 22, 1509-1518.

Authors

Wei-Yang Yu and V. Roshan Joseph.

License

softDOE is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

softdoe-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

softdoe-0.1.0-cp39-cp39-macosx_10_9_universal2.whl (177.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file softdoe-0.1.0.tar.gz.

File metadata

  • Download URL: softdoe-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for softdoe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d6c50577c0c2aac7201dc96005b3d1c722f0b271f4db88898c18a654aaee6d5
MD5 9cf0a9ba922406c51236bc0d9cbc9866
BLAKE2b-256 a66a507bf97d4d8609a65f13e0ca01f100ac0fa986cab02a4317c467f119124d

See more details on using hashes here.

File details

Details for the file softdoe-0.1.0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for softdoe-0.1.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 924bf1a9ac454674f27fd4d048f69a413c23e8dc942505b1589fb52c03ef0e94
MD5 66350ab4105a776c7f5ebf1248090e3f
BLAKE2b-256 41ecd725b9d2bf13771f34516a6e413535f10557ab96bb6bf57d8d8f99b54b96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page