statistics module

This module contains useful classes used to obtain metadata from the dataset generation processes.

class src.dataset_creation.statistics.DatasetStats(stats: dict[str, Metadata])[source]

Bases: object

Class used to store and save metadata from multiple runs to file.

Parameters:
statsdict[str, Metadata]

dictionary containing statistics relative to input files.

Methods

write_metadata_files(directory)

Writes on disk the dataset statistics.

write_metadata_files(directory: Path)[source]

Writes on disk the dataset statistics.

Parameters:
directorydict[str]

Directory in which to save the dataset statistics.

class src.dataset_creation.statistics.Metadata(*, seed: int, track_type: Literal['PSS', 'AC_rail', 'subgrade'], ballast_simulation_seed: int | None, fouling_level: float, is_fouled: bool, general_deterioration: float, layer_sizes: dict[str, float], general_water_content: float, water_infiltrations: tuple[float, float, float], layer_water_ranges: tuple[tuple[float, float], tuple[float, float], tuple[float, float]], sleepers_material: Literal['wood', 'steel', 'concrete'], sleeper_positions: list[tuple[float, float, float]], fouling_material: tuple[float, float] | None = None, pss_material: tuple[float, float] | None = None, subsoil_material: tuple[float, float] | None = None)[source]

Bases: BaseModel

Utility class to keep the sample metadata information

ballast_simulation_seed: int | None
fouling_level: float
fouling_material: tuple[float, float] | None
general_deterioration: float
general_water_content: float
is_fouled: bool
layer_sizes: dict[str, float]
layer_water_ranges: tuple[tuple[float, float], tuple[float, float], tuple[float, float]]
pss_material: tuple[float, float] | None
seed: int
sleeper_positions: list[tuple[float, float, float]]
sleepers_material: Literal['wood', 'steel', 'concrete']
subsoil_material: tuple[float, float] | None
track_type: Literal['PSS', 'AC_rail', 'subgrade']
water_infiltrations: tuple[float, float, float]