romcomma.user.sample.DOE§
- class DOE[source]§
Bases:
object
Sampling methods for inputs.
- __init__()§
Methods
__init__
()full_factorial
(N, M)Full factorial DOE.
latin_hypercube
(N, M[, is_centered])Latin Hypercube DOE.
space_filling_test
(X, o)Test whether
X
is a space-filling design matrix, by finding the distance to the nearest point inX
foro
test points.Attributes
Function signature of a DOE method.
- Method§
Function signature of a DOE method.
alias of
Callable
[[int
,int
,Any
],ndarray
]
- static latin_hypercube(N, M, is_centered=True, **kwargs)[source]§
Latin Hypercube DOE.
- Parameters:
N (int) – The number of samples (rows).
M (int) – The of input dimensions (columns).
is_centered (bool) – Boolean ordinate whether to centre each sample in its Latin Hypercube cell. Default is False, which locates the sample randomly within its cell.
kwargs – Passed directly to scipy.stats.qmc.LatinHypercube.
Returns: An (N,M) matrix of N samples of dimension M.
- static full_factorial(N, M)[source]§
Full factorial DOE.
- Parameters:
N (int) – The number of samples (rows).
M (int) – The of input dimensions (columns).
Returns: An (N,M) matrix of N samples of dimension M.
- static space_filling_test(X, o)[source]§
Test whether
X
is a space-filling design matrix, by finding the distance to the nearest point inX
foro
test points.- Parameters:
X (ndarray) – An (N,M) design matrix.
o (int) – The number of test points used to assess whether
X
is a space-filling design.
- Return type:
Dict[str, float]
- Returns: A dict of six measures: The theoretical hard upper bound, expected upper bound and expected lower bound for a perfectly space-filling
design matrix, followed by the max, mean and SD of the distance-to-nearest-in-X over the o test points.