Answered step by step
Verified Expert Solution
Question
1 Approved Answer
One cool way to construct a new kernel from an existing set of ( base ) kernels is through graphs. Let G = ( V
One cool way to construct a new kernel from an existing set of base kernels is through graphs. Let G V E
be a directed acyclic graph DAG where V denotes the nodes and E denotes the arcs directed edges For
convenience let us assume there is a source node s that has no incoming arc and there is a sink node t that has no
outgoing arc. We put a base kernel kappa e that is a function kappa e : X times X R on each arc e u v in E For
each path P u u ud with ui ui being an arc in E we can define the kernel for the path P
as the product of kernels along the path:
x z in X kappa P x z Y
d
i
kappa uiui
x z
Then, we define the kernel for the graph G as the sum of all possible s t path kernels:
x z in X kappa Gx z X
P in pathst
kappa P x z
pt Prove that kappa G is indeed a kernel. You may use any property that we learned in class about kernels.
Ans:
pts Let kappa i
i n be a set of given kernels. Construct a graph G with appropriate base kernels so
that the graph kernel kappa G
Pn
ikappa i
Similarly, construct a graph G with appropriate base kernels so that
the graph kernel kappa G
Qn
ikappa i
Ans:
YaoLiang Yu yaoliangyu@uwaterloo.ca
University of Waterloo CS Spring
pt Consider the subgragh of the figure below that includes nodes s a b c and arcs connecting them
Compute the graph kernel where s and c play the role of source and sink, respectively. Repeat the computation
with the subgraph that includes s a b c d and arcs connecting them where d is the sink now.
s a b c d t
xz
e
xz
xz
tanhxz
e
xz
Ans:
pts Find an efficient algorithm to compute the graph kernel kappa Gx zfor two fixed inputs x and z in
time OV E assuming each base kernel kappa e costs O to evaluate. You may assume there is always at
least one s t path. State and justify your algorithm is enough; no need although you are encouraged to
give a full pseudocode.
Note that the total number of paths in a DAG can be exponential in terms of the number of nodes V so
naive enumeration would not work. For example, replicating the intermediate nodes in the above figure n
times creates n paths from s to t
Hint: Recall that we can use topological sorting to rearrange the nodes in a DAG such that all arcs go from
a smaller node to a bigger one.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started