HungaryCPDataLoader

class stgraph.dataset.HungaryCPDataLoader(verbose: bool = False, lags: int = 4, cutoff_time: int | None = None, redownload: bool = False)[source]

Bases: STGraphTemporalDataset

County level chicken pox cases in Hungary.

This dataset comprises information on weekly occurrences of chickenpox in Hungary from 2005 to 2015. The graph structure is static with nodes representing the counties and edges are neighbourhoods between them. Vertex features are lagged weekly counts of the chickenpox cases.

This class provides functionality for loading, processing, and accessing the Hungary Chickenpox dataset for use in deep learning tasks such as County level case count prediction.

gdata

num_nodes

num_edges

total_timestamps

20

102

521

Example

from stgraph.dataset import HungaryCPDataLoader

hungary = HungaryCPDataLoader(verbose=True)
num_nodes = hungary.gdata["num_nodes"]
edge_list = hungary.get_edges()
Parameters:
  • verbose (bool, optional) – Flag to control whether to display verbose info (default is False)

  • lags (int, optional) – The number of time lags (default is 4)

  • cutoff_time (int, optional) – The cutoff timestamp for the temporal dataset (default is None)

  • redownload (bool, optional (default is False)) – Redownload the dataset online and save to cache

name

The name of the dataset.

Type:

str

gdata

Graph meta data.

Type:

dict

get_all_targets() ndarray[source]

Return the targets for each timestamp.

get_edge_weights() ndarray[source]

Return the edge weights.

get_edges() list[source]

Return the edge list.