MODULE REFERENCE
adapters
anomx.data.base.adaptersDataset adapters producing the canonical observation representation.
Adapters are the only place where storage formats (records, time-series batches, files, platform stores) are known. Everything downstream operates on ObservationSet.
classView source ↗
DatasetAdapter
DatasetAdapterBases: ABC
Read data from a concrete source and produce an observation set.
Members
loadmethod
load() -> ObservationSetMaterialize the source into the canonical representation.
Returns ObservationSet
classView source ↗
RecordsAdapter
RecordsAdapter(records: list[dict[str, Any]] | pd.DataFrame, *, feature_columns: list[str] | None = None, entity_column: str | None = None, timestamp_column: str | None = None, metadata: dict[str, Any] | None = None)Bases: DatasetAdapter
Adapt in-memory records (e.g. independent JSON samples) into observations.
| Parameter | Type | Default |
|---|---|---|
records | list[dict[str, Any]] | pd.DataFrame | required |
feature_columnskeyword only | list[str] | None | None |
entity_columnkeyword only | str | None | None |
timestamp_columnkeyword only | str | None | None |
metadatakeyword only | dict[str, Any] | None | None |
Members
loadmethod
classView source ↗
TimeSeriesBatchAdapter
TimeSeriesBatchAdapter(batch: TimeSeriesBatch, *, metadata: dict[str, Any] | None = None)Bases: DatasetAdapter
Adapt a TimeSeriesBatch into a temporal observation set.
| Parameter | Type | Default |
|---|---|---|
batch | TimeSeriesBatch | required |
metadatakeyword only | dict[str, Any] | None | None |