CalculateGraphletKernelCpp: An C++ implementation of graphlet kernels

Description Usage Arguments Value Author(s) References Examples

View source: R/RcppExports.R

Description

This function calculates a graphlet kernel matrix.

Usage

1
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

Author(s)

Mahito Sugiyama

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

1
2
3
4
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)

Example output

Loading required package: igraph

Attaching package:igraphThe following objects are masked frompackage:stats:

    decompose, spectrum

The following object is masked frompackage:base:

    union

graphkernels documentation built on Dec. 20, 2021, 9:07 a.m.