mlx_graphs.datasets.EllipticBitcoinDataset#
- class mlx_graphs.datasets.EllipticBitcoinDataset(base_dir: str | None = None, pre_transform: Callable | None = None, transform: Callable | None = None)[source]#
The Elliptic Bitcoin dataset of Bitcoin transactions from the “Anti-Money Laundering in Bitcoin: Experimenting with Graph Convolutional Networks for Financial Forensics” paper.
EllipticBitcoinDatasetmaps Bitcoin transactions to real entities belonging to licit categories (exchanges, wallet providers, miners, licit services, etc.) versus illicit ones (scams, malware, terrorist organizations, ransomware, Ponzi schemes, etc.)There exists 203,769 node transactions and 234,355 directed edge payments flows, with two percent of nodes (4,545) labelled as illicit, and twenty-one percent of nodes (42,019) labelled as licit. The remaining transactions are unknown
- Parameters:
base_dir (
Optional[str]) – Directory where to store dataset files. Default is in the local directory.mlx_graphs_data/.pre_transform (
Optional[Callable]) – A function/transform which takes in a GraphData object and returns a transformed version. The data will be transformed before saving to the disk.transforms – A function/transform that takes in a graphData object and returns a transformed version The data object will be transformed before every access
- __init__(base_dir: str | None = None, pre_transform: Callable | None = None, transform: Callable | None = None)[source]#
Methods
__init__([base_dir, pre_transform, transform])download()Download the dataset at self.raw_path.
load()Load the processed dataset
process([train])Process the dataset and store data in self.data
save()Save the processed dataset
Attributes
nameName of the dataset
num_edge_classesReturns the number of edge classes to predict.
num_edge_featuresReturns the number of edge features.
num_graph_classesReturns the number of graph classes to predict.
num_graph_featuresReturns the number of graph features.
num_graphsReturns the number of graphs in the dataset.
num_itemsReturns the number of items in the dataset.
num_node_classesReturns the number of node classes to predict.
num_node_featuresReturns the number of node features.
processed_pathThe path where raw files are stored.
raw_file_namesraw_pathThe path where raw files are stored.