Datasets

GraphNeuralNetworks.jl doesn't come with its own datasets, but leverages those available in the Julia (and non-Julia) ecosystem. In particular, the examples in the GraphNeuralNetworks.jl repository make use of the MLDatasets.jl package. There you will find common graph datasets such as Cora, PubMed, Citeseer, TUDataset and many others.

GraphNeuralNetworks.jl provides the mldataset2gnngraph method for interfacing with MLDatasets.jl.

GraphNeuralNetworks.mldataset2gnngraphFunction
mldataset2gnngraph(dataset)

Convert a graph dataset from the package MLDatasets.jl into one or many GNNGraphs.

Examples

julia> using MLDatasets, GraphNeuralNetworks

julia> mldataset2gnngraph(Cora())
GNNGraph:
    num_nodes = 2708
    num_edges = 10556
    ndata:
        features => 1433×2708 Matrix{Float32}
        targets => 2708-element Vector{Int64}
        train_mask => 2708-element BitVector
        val_mask => 2708-element BitVector
        test_mask => 2708-element BitVector
source