specs

Formal generator specifications.

class pysatl_cpd.data.generator.specs.NormalSpec(kind='normal', mean=0.0, std=1.0)[source]

Bases: object

Normal distribution specification.

Defines parameters for a normal (Gaussian) distribution used in synthetic data generation.

Parameters:
kind: Literal['normal']
mean: float
std: float
__init__(kind='normal', mean=0.0, std=1.0)
Parameters:
Return type:

None

class pysatl_cpd.data.generator.specs.UniformSpec(kind='uniform', low=0.0, high=1.0)[source]

Bases: object

Uniform distribution specification.

Defines parameters for a uniform distribution over a fixed interval used in synthetic data generation.

Parameters:
kind: Literal['uniform']
low: float
high: float
__init__(kind='uniform', low=0.0, high=1.0)
Parameters:
Return type:

None

class pysatl_cpd.data.generator.specs.ExponentialSpec(kind='exponential', scale=1.0)[source]

Bases: object

Exponential distribution specification.

Defines parameters for an exponential distribution used in synthetic data generation.

Parameters:
kind: Literal['exponential']
scale: float
__init__(kind='exponential', scale=1.0)
Parameters:
Return type:

None

class pysatl_cpd.data.generator.specs.StudentTSpec(kind='student_t', df=5.0, loc=0.0, scale=1.0)[source]

Bases: object

Student’s t-distribution specification.

Defines parameters for a Student’s t-distribution used in synthetic data generation.

Parameters:
kind: Literal['student_t']
df: float
loc: float
scale: float
__init__(kind='student_t', df=5.0, loc=0.0, scale=1.0)
Parameters:
Return type:

None

type pysatl_cpd.data.generator.specs.UnivariateDistributionSpec = NormalSpec | UniformSpec | ExponentialSpec | StudentTSpec
class pysatl_cpd.data.generator.specs.MultivariateNormalSpec(kind='multivariate_normal', means=<factory>, covariance=1.0)[source]

Bases: object

Multivariate normal distribution specification.

Defines parameters for a multivariate normal distribution with named features and covariance structure.

Parameters:
kind: Literal['multivariate_normal']
means: frozendict[str, float]
covariance: NumericArray | tuple[tuple[float, ...], ...] | tuple[float, ...] | float
__post_init__()[source]

Validate multivariate-normal specification fields.

Return type:

None

__init__(kind='multivariate_normal', means=<factory>, covariance=1.0)
Parameters:
Return type:

None

class pysatl_cpd.data.generator.specs.IndependentColumnsSpec(kind='independent_columns', columns=<factory>)[source]

Bases: object

Independent columns distribution specification.

Defines a distribution where each feature column has its own independent univariate distribution.

Parameters:
kind: Literal['independent_columns']
columns: frozendict[str, UnivariateDistributionSpec]
__post_init__()[source]

Validate independent-column specification fields.

Return type:

None

__init__(kind='independent_columns', columns=<factory>)
Parameters:
Return type:

None

type pysatl_cpd.data.generator.specs.DistributionSpec = MultivariateNormalSpec | IndependentColumnsSpec | UnivariateDistributionSpec
class pysatl_cpd.data.generator.specs.SegmentSpec(plan_name, length)[source]

Bases: object

Segment specification within a scenario.

Defines a single segment with a reference to a segment plan and the length of the segment.

Parameters:
  • plan_name (str)

  • length (int)

plan_name: str
length: int
__post_init__()[source]

Validate segment specification fields.

Return type:

None

__init__(plan_name, length)
Parameters:
  • plan_name (str)

  • length (int)

Return type:

None

class pysatl_cpd.data.generator.specs.SegmentPlan(distribution, state=None, metadata=<factory>, name=None)[source]

Bases: object

Plan for generating a segment.

Defines the distribution, state, and metadata for a specific segment type within a scenario.

Parameters:
distribution: DistributionSpec
state: StateDescriptor | None
metadata: frozendict[str, Hashable]
name: str | None
__init__(distribution, state=None, metadata=<factory>, name=None)
Parameters:
Return type:

None

class pysatl_cpd.data.generator.specs.ScenarioSpec(name, segments, plans, metadata=<factory>)[source]

Bases: object

Scenario specification for synthetic data generation.

Defines a complete scenario with named segments, segment plans, and metadata for generating synthetic series.

Parameters:
name: str
segments: tuple[SegmentSpec, ...]
plans: frozendict[str, SegmentPlan]
metadata: frozendict[str, Hashable]
__post_init__()[source]

Validate scenario specification fields.

Return type:

None

__init__(name, segments, plans, metadata=<factory>)
Parameters:
Return type:

None

pysatl_cpd.data.generator.specs.freeze_float_mapping(mapping)[source]

Freeze a mutable float mapping to a frozendict.

Parameters:

mapping (Mapping[str, float]) – Mutable mapping of string keys to float values.

Returns:

Immutable frozendict with float values.

Return type:

frozendict[str, float]

pysatl_cpd.data.generator.specs.freeze_state_mapping(mapping)[source]

Freeze a mutable state mapping to a StateDescriptor.

Parameters:

mapping (Mapping[str, str | int | float | bool]) – Mutable mapping of state key-value pairs.

Returns:

Immutable state descriptor from the mapping.

Return type:

StateDescriptor

pysatl_cpd.data.generator.specs.freeze_univariate_mapping(mapping)[source]

Freeze a mutable univariate distribution mapping.

Parameters:

mapping (Mapping[str, NormalSpec | UniformSpec | ExponentialSpec | StudentTSpec]) – Mutable mapping of distribution specifications.

Returns:

Immutable frozendict with univariate distributions.

Return type:

frozendict[str, NormalSpec | UniformSpec | ExponentialSpec | StudentTSpec]

pysatl_cpd.data.generator.specs.freeze_distribution_mapping(mapping)[source]

Freeze a mutable distribution mapping.

Parameters:

mapping (Mapping[str, MultivariateNormalSpec | IndependentColumnsSpec | NormalSpec | UniformSpec | ExponentialSpec | StudentTSpec]) – Mutable mapping of distribution specifications.

Returns:

Immutable frozendict with distributions.

Return type:

frozendict[str, MultivariateNormalSpec | IndependentColumnsSpec | NormalSpec | UniformSpec | ExponentialSpec | StudentTSpec]