This project is a simple implementation of the Latin Hypercube Sampling (LHS) method using Python. Its primary purpose is to demonstrate how LHS can be used to efficiently estimate expected values from random distributions or stochastic processes by ensuring better coverage of the input space compared to traditional random sampling.
Use Cases: Engineering design simulations, uncertainty quantification.
A live version of this project is available as a web app powered by Streamlit. Try it out here:
lhs.py: Main Python script containing the LHS sampling logic.requirements.txt: Lists the dependencies required to run the application.README.md: This documentation file.
- Clone this repository:
git clone https://github.com/zenklinov/Latin-Hypercube-Sampling.git
cd Latin-Hypercube-Sampling- (Optional) Create and activate a virtual environment:
python -m venv env
source env/bin/activate # On Linux/macOS
env\Scripts\activate.bat # On Windows- Install the required dependencies:
pip install -r requirements.txt- Run the Streamlit app:
streamlit run lhs.py