distribution

Concrete distribution instances with specific parameter values.

This module provides the implementation for individual distribution instances created from parametric families.

class pysatl_core.families.distribution.ParametricFamilyDistribution(family_name, _distribution_type, _parametrization, _support)[source]

Bases: Distribution

A specific distribution instance from a parametric family.

Represents a concrete distribution with specific parameter values, providing methods for computation and sampling.

Parameters:
  • family_name (str) – Name of the distribution family.

  • _distribution_type (DistributionType) – Type of this distribution.

  • _parametrization (Parametrization) – Parameter values for this distribution.

  • _support (Support or None) – Support of this distribution.

family_name: str
property distribution_type: pysatl_core.types.DistributionType

Get the distribution type.

property parametrization: pysatl_core.families.parametrizations.Parametrization

Get the parametrization object containing distribution parameters.

Returns:

Parametrization instance with all parameter values.

Return type:

Parametrization

property parameters: dict[str, Any]

Get distribution parameters as a dictionary (shortcut).

Returns:

Dictionary mapping parameter names to their values.

Return type:

dict[str, Any]

property parametrization_name: ParametrizationName

Get the name of the parametrization used by this distribution.

Returns:

Name of the parameterization format (e.g., ‘meanStd’).

Return type:

ParametrizationName

property parameters_constraints: list[ParametrizationConstraint]

Get constraints that apply to the distribution’s parameters.

Returns:

List of parameter constraints for validation.

Return type:

list[ParametrizationConstraint]

property family: pysatl_core.families.parametric_family.ParametricFamily

Get the parametric family this distribution belongs to.

Returns:

The parametric family of this distribution.

Return type:

ParametricFamily

property analytical_computations: Mapping[GenericCharacteristicName, AnalyticalComputation[Any, Any]]

Get analytical computations for this distribution.

Lazily computed and cached per instance. Cache invalidates when parametrization object or name changes.

property sampling_strategy: pysatl_core.distributions.strategies.SamplingStrategy

Get the sampling strategy for this distribution.

property computation_strategy: ComputationStrategy[Any, Any]

Get the computation strategy for this distribution.

property support: Support | None

Get the support of this distribution.

sample(n, **options)[source]

Generate random samples from the distribution.

Parameters:
  • n (int) – Number of samples to generate.

  • **options (Any) – Additional sampling options forwarded to the underlying sampling strategy.

Returns:

NumPy array containing n generated samples. The exact array shape depends on the distribution and the sampling strategy.

Return type:

NumericArray

__init__(family_name, _distribution_type, _parametrization, _support)
Parameters:
Return type:

None