pyDOE
pyDOE copied to clipboard
_lhscorrelate calculates correlation coefficient incorrectly
The correlation coefficient in _lhscorrelate is calculated as:
R = np.corrcoef(Hcandidate)
According to NumPy documentation, this function expects each row to be a variable; however, lhs treats the columns as variables. The correct way to calculate the correlation coefficient should be:
R = np.corrcoef(Hcandidate, rowvar=False)