presets
Preset scenario builders.
- pysatl_cpd.data.generator.presets.get_preset_scenario(name)[source]
Retrieve a preset scenario specification by name.
- Parameters:
name (
str) – Name of the preset scenario to retrieve.- Returns:
The preset scenario specification.
- Return type:
- Raises:
ValueError – If the preset name is unknown.
- pysatl_cpd.data.generator.presets.build_preset_scenario(name, *, feature_names, series_length, num_segments)[source]
Build a preset scenario specification with specified parameters.
- Parameters:
- Returns:
The constructed scenario specification.
- Return type:
- Raises:
ValueError – If series_length or num_segments is not positive, or feature_names is empty.
- pysatl_cpd.data.generator.presets.preset_dataset(preset, *, n_series, seed, series_length=1200, n_features=None, num_segments=3)[source]
Build a pandas-backed dataset from a preset scenario specification.
- Parameters:
preset (
str) – Name of the preset scenario to use.n_series (
int) – Number of series to generate.seed (
int) – Random seed for reproducibility.series_length (
int) – Length of each generated series.n_features (
int|None) – Number of features. Defaults to 3 for3d_mean_shiftsand 2 for all other presets.num_segments (
int) – Number of segments per series.
- Returns:
Dataset containing the generated labeled series.
- Return type: