trajdl.datasets.arrow.locseq module#
- class trajdl.datasets.arrow.locseq.LocSeqDataset(table: Table, unsafe: bool = False)[source]#
Bases:
BaseArrowDatasetDataset for location sequences.
- check_table(table: Table) None[source]#
Validate the input Arrow table.
- Parameters:
table (pa.Table) – The Arrow table to validate.
Notes
This method is a placeholder and needs to be implemented to ensure the table complies with expected structure and data types.
- classmethod init_from_loc_seqs(seqs: Iterable[LocSeq]) LocSeqDataset[source]#
Initialize the dataset from an iterable of location sequences.
- Parameters:
seqs (Iterable[LocSeq]) – An iterable containing LocSeq objects.
- Returns:
An instance of LocSeqDataset initialized from the provided location sequences.
- Return type:
Notes
The method extracts the ‘data’, ‘id’, and ‘ts’ attributes from each LocSeq object to build an Arrow table.