I want to prove that the zero extension of a kernel is still a kernel.
I.e. for a set of vectors in D:
$$k_0(x,x')= \begin{cases}k(x,x') \ if\ x\in D \ and \ x'\in D\\0\ otherwise\end{cases}$$ $k(x,x')$ is a valid kernel.
In my mind it would be enough to say it is a valid kernel because $k(x,x')$ is valid. The zero extension doesn't change anything, since for vectors $\notin D$, $k_0$ still remains positive semi definite (namely equal to zero).

Am I missing something?


  • $\begingroup$ anyone that can help? $\endgroup$ – Dahlai Nov 24 '15 at 12:01
  • $\begingroup$ Just note that if you have a square matrix of the form $B = \begin{pmatrix} A & 0 \\ 0 & 0 \end{pmatrix}$ then $det (B - \lambda I) = det(A - \lambda I) \lambda^s$, where $s$ equals size of $B$ minus size of $A$. So no new eigenvalues would appear except $\lambda = 0$. $\endgroup$ – Alexey Zaytsev Dec 15 '15 at 15:48

If $k(x,x')$ is a valid kernel, then $k_0(x, x') = f(x)k(x, x')f(x')$ is also a valid kernel for some real-valued function $f$. To see this, write

$$k_0(x, x') = f(x)\langle \phi(x), \phi(x') \rangle f(x') = \langle f(x)\phi(x), f(x') \phi(x') \rangle = \langle \psi(x), \psi(x') \rangle $$

where $\phi(\cdot)$ is the underlying feature map associated with $k$, and $\psi(x) = f(x)\phi(x)$ is the feature map associated with $k_0$.

Assume that the domain of $k$ is $\mathcal{X}$ and $D \subseteq \mathcal{X}$. Then, your $k_0$ is a valid kernel because

$$k_0(x, x') = I(x \in D) k(x, x') I(x' \in D)$$ where $I(a) \in \{0,1\}$ is the indicator function which is 1 if $a$ is true. Just set the above $f(x) := I(x \in D)$ to see that $k_0$ is valid.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.