snowshu.core.samplings package¶
Subpackages¶
Submodules¶
snowshu.core.samplings.utils module¶
-
snowshu.core.samplings.utils.get_sampling_from_partial()¶ Takes a sampling config dict and returns an instance of
BaseSamplingThis will accept either a string name of a sampling to invoke it with no params, or a dict to invoke with the params passed.
- Parameters
partial – the portion of the configuration dict that creates the sampling.
Example
Invoking with a partial of
"default"will return an instance ofDefaultSamplingwith all default values.Invoking with a partial of
{"default": {"margin_of_error": 0.03}}will return an instance ofDefaultSamplingwith margin_of_error set to 3%.
- Returns
The configured
DefaultSampling.