Distribution samplers¶
Initial-guess distribution samplers used by DataFit for multi-start
optimization. Mirrors ionworkspipeline.data_fits.distribution_samplers.
Schemas for distribution_samplers (match ionworkspipeline: iwp.data_fits.distribution_samplers).
- class ionworks_schema.distribution_samplers.DistributionSampler¶
Bases:
BaseSchemaBase class for initial-guess distribution samplers.
Not typically used directly — configure via one of the concrete subclasses below.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.distribution_samplers.HypercubeSampler¶
Bases:
DistributionSamplerBase class for hypercube-style samplers over the parameter bounds.
Samples are drawn from the unit hypercube and then mapped through each parameter’s distribution to produce scaled initial guesses spanning the parameter bounds.
Extends:
ionworks_schema.distribution_samplers.distribution_samplers.DistributionSampler- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.distribution_samplers.LatinHypercube¶
Bases:
HypercubeSamplerLatin Hypercube sampler over the parameter bounds.
Each of the
multistartsinitial guesses is drawn from a different stratum of the hypercube formed by the parameter bounds, giving better space-filling than plain uniform sampling. Backed byscipy.stats.qmc.LatinHypercube.Extends:
ionworks_schema.distribution_samplers.distribution_samplers.HypercubeSampler- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.distribution_samplers.Uniform¶
Bases:
HypercubeSamplerUniform sampler over the parameter bounds.
Each initial guess is drawn i.i.d. uniformly from the box defined by the parameter bounds. Simpler but less space-filling than
LatinHypercube.Extends:
ionworks_schema.distribution_samplers.distribution_samplers.HypercubeSampler- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].