Simple Python implementation of QS and DS
The purpose of this code is to provide simple and easy implementation QS (Quantile Sampling) and DS (Direct Sampling) for future development in Python. The goal is to share a code easy to understand, read and modify to do algorithmic tests.
The code is designed for a single continuous variable that is usually enough to understand the philosophy behind the algorithm.
To test the code please refer to the qs.py
and ds.py
The managment of categorical variable was added and can be tested using qsCat.py
and dsCat.py
In any case this code should NOT be used for production OR BENCHMARKING. Please refer to G2S for QS and to RandLab for DS for efficient implementations.
For a similar implementation of DS in MATLAB please refer to DS_in_Matlab