tirthajyoti / doepy

Design of Experiment Generator. Read the docs at: https://doepy.readthedocs.io/en/latest/
MIT License
143 stars 40 forks source link

Negative floats return incorrect table #18

Open wkew opened 1 year ago

wkew commented 1 year ago

When generating a Latin hypercube sampling (simple or space filled), input factors with negative value levels return a table with incorrect values.

For example,

build.lhs(
{'a':[-1,-5],
'b':[-3,-6],
'c':[1,2]})

returns a table like (numbers truncated for display)

   a        b      c
 0.5     -1.9     1.0
-0.76    -0.78    1.95
-0.04    -2.14    1.43

where clearly the options for A and B are out of bounds for the provided levels, whereas c is correct.

Python 3.8.13 doepy version 0.0.1 installed from pip

gedeck commented 1 year ago

The order of the boundaries is important (minValue maxValue). Try:

build.lhs(
{'a':[-5,-1],
'b':[-6,-3],
'c':[1,2]})