Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.71 KB

README.md

File metadata and controls

68 lines (47 loc) · 2.71 KB

pyOLHS


pyOLHS is a Python package that provides Optimal LatinHyperCube sampling.

The introduction of Algorithms is on my WeChat Official Account.

The Python version of the OLHS algorithm is less efficient. In the future, I will release an open-source C++ version optimized with openMP and TBB.

Additionally, I plan to update other multi-disciplinary optimization algorithms, such as Kriging models and other optimization algorithms like Bayesian Optimization.

Record

2024.6.21 更新了采样结果去重方法 unique=True进行去重

 bound = [[1, 6, 1], [2, 10, 2], [4, 100, 4]]
    a = OLHS(bound, 50, 20, initseed=1, optseed=1,unique=True)
    c = a.sampling()

Getting Started

discrete variable

bound = [[0, 1.0, 0.01], [0, 1.0, 0.01]]
#2024.1.4:initseed means to fix the origin lathin sampling result optseed means to fix the optimization method
#if you want to get the same optimization method , fix them both, 
a = OLHS(bound, 20, 100,initseed=1,optseed=1) 
#if you want to see different optimization result from the same origin latin result, only fix initseed
a = OLHS(bound, 20, 100,initseed=1)

c = a.sampling()

continuous variable

bound = [[0, 1.0,], [0, 1.0]]
a = OLHS(bound, 20, 1000,"center")
c = a.sampling()

Notes:I convert my C++ code into this Python version, but for some reason, the performance is not as good as the C++ version. Below are the results of the C++ execution.

olhs

Release Note:

-2024.1.4 add random seed to both origin latin sampling and optimization algorithm

Communication

References

Jin R, Chen W, Sudjianto A. An efficient algorithm for constructing optimal design of computer experiments[C]//International design engineering technical conferences and computers and information in engineering conference. 2003, 37009: 545-554.

License

PyOLHS has a BSD-style license, as found in the LICENSE file.