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.

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.0.0.tar.gz (7.8 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.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for expandlhs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 edb0683161d4d01cf5a77ca22d7062e427bbcb23947b3581d7911a46bb93188b
MD5 34e92f90918c882438c60030a146c4d4
BLAKE2b-256 7fe444dfaa12793b534b06b0abf779cb8df5f6ef34b4c6cf3ba6032e1827e0c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: expandlhs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 245b4f76c5136aa67027494e1462e1792213e54acb9eaec1c759e312291786a8
MD5 dca38a7d0ebf0e35f261502d53fe559e
BLAKE2b-256 bd09b6569185ebf107d7b2168bf5eb1b580b87330d9ceb63fc7d07637d0d2cd5

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