Answered step by step
Verified Expert Solution
Link Copied!

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 =(u0-> u1->-> ud) with ui1-> 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=1
\kappa ui1->ui
(x, z).(1)
Then, we define the kernel for the graph G as the sum of all possible s -> t path kernels:
x, z in X ,\kappa G(x, z)= X
P in path(s->t)
\kappa P (x, z).(2)
1.(1 pt) Prove that \kappa G is indeed a kernel. [You may use any property that we learned in class about kernels.]
Ans:
2.(2 pts) Let \kappa i
, i =1,..., n be a set of given kernels. Construct a graph G (with appropriate base kernels) so
that the graph kernel \kappa G =
Pn
i=1\kappa i
. Similarly, construct a graph G (with appropriate base kernels) so that
the graph kernel \kappa G =
Qn
i=1\kappa i
.
Ans:
Yao-Liang Yu (yaoliang.yu@uwaterloo.ca)20241/6
University of Waterloo CS480/6802024 Spring
3.(1 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)
2
(xz 1)2
tanh(xz +1)
e
|xz|/2
1
Ans:
4.(2 pts) Find an efficient algorithm to compute the graph kernel \kappa G(x, z)(for two fixed inputs x and z) in
time O(|V |+|E|), assuming each base kernel \kappa e costs O(1) 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 2n 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.]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

2. Describe how technology can impact intercultural interaction.

Answered: 1 week ago