romcomma.user.sample.Function§
- class Function(root, doe, function_vector, N, M, noise_variance, ext=None, overwrite_existing=False, **kwargs)[source]§
Bases:
object
Sample a
user.function.Vector
.- Parameters:
root (Path | str) –
doe (DOE.Method) –
function_vector (functions.Vector) –
N (int) –
M (int) –
noise_variance (GaussianNoise.Variance) –
ext (str | None) –
overwrite_existing (bool) –
kwargs (Any) –
- __init__(root, doe, function_vector, N, M, noise_variance, ext=None, overwrite_existing=False, **kwargs)[source]§
Construct a Repository by sampling a function over a DOE.
- Parameters:
root (Path | str) – The folder under which the Repository will sit.
doe (Callable[[int, int, Any], ndarray]) – An experimental design for the sample inputs.
function_vector (Vector) – A vector function.
N (int) – The number of samples (rows) in the sample.
M (int) – The input dimensionality (columns).
noise_magnitude – The (L,L) homoskedastic
GaussianNoise.Variance
.ext (str | None) – Unless None, the repo name is suffixed by
.[ext]
.overwrite_existing (bool) – Whether to overwrite an existing Repository.
**kwargs (Any) – Options passed straight to doe.
noise_variance (Variance) –
Methods
__init__
(root, doe, function_vector, N, M, ...)Construct a Repository by sampling a function over a DOE.
collection
(sub_folder)Construct a Dict for user.results.Collect, with appropriate
extra_columns
.Create an un-rotated Fold in the Repository, with index
K+1
.Attributes
The Repository containing the Function sample.
- property repo: Repository§
The Repository containing the Function sample.