The current version of FDGNN is made available in MATLAB, fully exploiting sparse matrix computation capabilities.
Dowbload the code as a compressed folder HERE.
The compressed folder includes the following files.
- FDGNN.m: contains the code of the FDGNN MATLAB class, which implements the FDGNN model
- accuracy.m: used to compute accuracy for binary and multi-class classification learning tasks
- sparse_matrix_C.m: used to construct sparse internal weight matrices used for FDGNN.
- model_selection.m: used to perform model selection for a specific number of layers in the embedding component.
- experiment.m: used to perform the complete model selection (double cross fold validation) given a specific task, the number of neurons in each hidden layer, and the maximum number of layers to consider in the embedding component of the FDGNN.
- collab_dataset.mat: a .mat file containing the task information for the COLLAB dataset. See details below.
A learning task is described by a task structure with the following fields:
* name: A string name for the task
* info: A sub-structure with the fields
** U: the size of the input labels attached to the graph's vertices
** k: the degree of the set of graphs
* data: A sub-structure with the fields
** input: A cell array, where each element corresponds to one of the graphs in the dataset; the i-th element of the cell array is a structure with the fields
task.data.input{i}.adjacency_matrix: the NxN adjacency matrix of the graph
task.data.input{i}.labels: the UxN matrix where column j contains the label for vertex j
** target: A matrix containing the target values for the graphs in the dataset; in particular, denoted by G the number of graphs in the dataset, for binary classification tasks this is a 1xG vector of values in {-1,+1}, for multi-class classification tasks this is a TxG matrix, where each column is a -1/+1 one hot encoding of the target class.
* folds: A cell array containing the indices of the samples for the double (i.e., nested) cross fold validation splitting. In particular, for the i-th fold, task.folds{i} is a structure containing the following fields:
** training: a row array of indices corresponding to the training set for the fold
** test: a row array of indices corresponding to the test set for the fold
** nestedtr: a cell structure containing the indices for the training set of the nested cross fold validation
** validation: a cell structure containing the indices for the validation set of the nested cross fold validation
All the datasets used in the paper are taken from http://graphkernels.cs.tu-dortmund.de.
As an example, we give the task structure for the COLLAB dataset in the file collab_dataset.mat.