Learn R Programming

graphkernels (version 1.6.1)

CalculateGraphletKernelCpp: An C++ implementation of graphlet kernels

Description

This function calculates a graphlet kernel matrix.

Usage

CalculateGraphletKernelCpp(graph_adj_all, graph_adjlist_all, k, connected)

Arguments

graph_adj_all

a list of adjacency matrices

graph_adjlist_all

a list of adjacency lists

k

the number \(k\) of graphlet nodes

connected

whether or not graphlets are conneceted

Value

a kernel matrix of the respective graphlet kernel

References

Shervashidze, N., Vishwanathan, S. V. N., Petri, T., Mehlhorn, K., Borgwardt, K. M.: Efficient Graphlet Kernels for Large Graph Comparison, Proceedings of the 12th International Conference on Artificial Intelligence and Statistics (AISTATS), 5, 488-495 (2009) https://proceedings.mlr.press/v5/shervashidze09a.html.

Examples

Run this code
# NOT RUN {
data(mutag)
al.list <- as.list(rep(NA, length(mutag)))
for (i in 1:length(mutag)) { al.list[[i]] <- as_adj_list(mutag[[i]]) }
K <- CalculateGraphletKernelCpp(list(), al.list, 4, 0)
# }

Run the code above in your browser using DataLab