Skip to content

Dataset

EventDataset

from_data classmethod

from_data(
    data: RelationalData,
    preproc: EventPreproc,
    on_disk: bool = False,
    path: Path | str | None = None,
) -> EventDataset

Build an EventDataset from the input data.

Parameters:

Name Type Description Default
data RelationalData

A RelationalData object with the data to be processed.

required
preproc EventPreproc

An EventPreproc to preprocess the data.

required
on_disk bool

Whether to save the processed data on disk. If True, during training the data will be loaded one batch at a time. This may slightly slow down the training, but will reduce the memory consumption.

False
path Path | str | None

The path to a directory where to save the processed data on disk. If None, it will be saved in a temporary directory.

None

Returns:

Type Description
EventDataset

An EventDataset object.

from_disk classmethod

from_disk(
    preproc: EventPreproc, path: Path | str
) -> EventDataset

Load an EventDataset from disk.

Parameters:

Name Type Description Default
preproc EventPreproc

The EventPreproc object used to preprocess the data.

required
path Path | str

The path to the directory where the processed data is stored on disk.

required

Returns:

Type Description
EventDataset

An EventDataset object.