Skip to main content

A Python package to expand a Latin Hypercube Sample

Project description

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15076931.svg)](https://doi.org/10.5281/zenodo.15076931)

## expandLHS

expandLHS is a Python module that implements a model-free expansion algorithm for a Latin Hypercube sample set. The Latin Hypercube Sampling (LHS) is a stratified sampling technique that allows to generate $N$ near-random samples in the $P$-dimensional hypercube $[0, 1)^P$. It is a space-filling sampling strategy that ensures the one-dimensional projection property, i.e. the samples are uniformly distributed in each one-dimension projection. This module extends the usage of this technique by implementing an expansion algorithm. Starting from an initial LHS set of size $N$, expandLHS samples $M$ additional points in a LHS-like fashion trying to preserve the LHS properties at most.

This algorithm is introduced in - “LHS in LHS”: a new expansion strategy for Latin hypercube sampling in simulation design. M. Boschini, D. Gerosa, A. Crespi, M. Falcone (to be published)

The code is distributed under version control at - [github.com/m-boschini/expandLHS](https://github.com/m-boschini/expandLHS)

The documentation is available at

To install the code simply use

pip install expandLHS

An example notebook can be found in the [documentation](https://m-boschini.github.io/expandLHS) together with a detailed description of the functions.

expandLHS is released under the MIT License.

#### Change log

  • v1.1.0 New feature: now it is possible to initialise a Latin Hypercube when the class is created

  • v1.0.0 First public release.

(Third-level versions not explicitly indicated refer to patches for minor typos/bug fixes)

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

expandlhs-1.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

expandlhs-1.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file expandlhs-1.1.0.tar.gz.

File metadata

  • Download URL: expandlhs-1.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for expandlhs-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4959ab386217aa9e905fe93e191a2a7bd53881027ea71cdfba1896b04e8aa04d
MD5 826efe6dd77f20080cb739e9c54c762f
BLAKE2b-256 6a158821e423e9cb89d9136a3438355e8646c478833c84d78e2c0b5e92b353ef

See more details on using hashes here.

File details

Details for the file expandlhs-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: expandlhs-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for expandlhs-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e09ab08f3bd29d70b5a5cfc21f6ba844b904d3d49b24216477c2ad5a6edf30e
MD5 29bd7f02c1e8f64ae6f7c66b04752a2f
BLAKE2b-256 84d7fa744b7e6c0729297c3506339e871be07366cc4084ceb84fffc5c15a819b

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