base_sample_generator
The base class for sample generation.
Subclasses should implement the generate method.
BaseSampleGenerator
Bases: BaseKwargsHandler, ABC
Base class for sample generator components.
Attributes:
| Name | Type | Description |
|---|---|---|
settings_class |
The settings class for this output handler. |
|
supported_kwargs |
The full set of supported keyword arguments for the |
|
required_kwargs |
The set of required keyword arguments for the |
Methods:
| Name | Description |
|---|---|
find_missing_required_kwargs |
Validates that all required keyword arguments are present. |
build_settings_from_kwargs |
Validates the keyword arguments and builds the settings object. |
generate |
Generate a list of samples from the provided data. |
Source code in src/mada_tools/simulation/simutils/samples/generation/base_sample_generator.py
generate(**kwargs)
abstractmethod
Generate a list of samples from the provided data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Dict[str, Any]
|
Keyword arguments for sample generation. This will vary by implementation. We use kwargs as each sampling method may require different parameters. |
{}
|
Returns:
| Type | Description |
|---|---|
ndarray
|
A numpy array of generated samples. |