Edge Histogram Kernel
The edge histogram kernel is a basic linear kernel on edge label histograms.
The kernel assumes edge-labeled graphs.
Let be a collection of graphs, and assume that each of their edges comes from an abstract edge space .
Given a set of node labels , is a function that assigns labels to the edges of the graphs.
Assume that there are labels in total, that is .
Then, the edge label histogram of a graph is a vector , such that for each .
Let be the edge label histograms of two graphs , respectively.
The edge histogram kernel is then defined as the linear kernel between and , that is
The complexity of the edge histogram kernel is linear in the number of edges of the graphs.
An implementation of that kernel can be found below