I'd appreciate help in clarifying my understanding of how to valid kernel functions, using the following two examples:
- $K(x, t) = x^Tt - (x^Tt)^2$
- $K(x, t) = e^{(x_1t_1)}$ where $x_1\ and\ t_1$ are the first elements in the $x\ and\ t$ vectors.
As I understand it, I can either:
- Find a feature map $\phi(x)$ such that $K(x, t) = \phi(x)^T \phi(t)$
- Build a Gram matrix $K$ and check if it is positive semi-definite.
For the first question, I built a Gram matrix using vectors $\begin{bmatrix}1 \\ 2 \end{bmatrix}$ and $\begin{bmatrix}2 \\ 2 \end{bmatrix}$ $\rightarrow$ $\begin{bmatrix}-20 && -30 \\ -30 && -56 \end{bmatrix}$
In row-echelon form, a pivot is negative: $\begin{bmatrix}60 && 90 \\ 0 && -11 \end{bmatrix}$
Thus (as I understand it) the kernel is not valid. Is this understanding correct?
As for the second question, it seems likes a variation of a Gaussian kernel, but I'm unclear as to the influence, if any, of the usage of only the first element in the argument vectors. How do I address the validity of this kernel (#2)?