import pyLHD
random_lhd = pyLHD.LatinHypercube(size = (10,3))
pyLHD.discrepancy(random_lhd)0.1521212129165316
criteria.discrepancy(arr, method='centered_L2')
Discrepancy of a given sample
| Name | Type | Description | Default |
|---|---|---|---|
arr |
numpy.numpy.ArrayLike | A numpy ndarray | required |
method |
str | Type of discrepancy. Defaults to ‘centered_L2’. Options include: ‘L2’, ‘L2_star’,‘centered_L2’, ‘modified_L2’, ‘mixture_L2’, ‘symmetric_L2’, ‘wrap_around_L2’ | 'centered_L2' |
| Type | Description |
|---|---|
| ValueError | Whenever number of rows is less than number of columns |
| Type | Description |
|---|---|
| float | Desired discrepancy type |
Examples: Calculate the centered_L2 discrepancy of random_lhd
0.1521212129165316
Calculate the L2 star discrepancy of random_lhd