Solution (source code)

= Solution

For $h$ in the <Reproducing kernel Hilbert space> $\mathcal H_k$, take the <directional derivative>:
$$
\left.\frac d{d\epsilon}L(g+\epsilon h)\right|_{\epsilon=0}=\sum_i(g(x_i)-y_i)h(x_i).
$$
The <reproducing property> says $h(x_i)=\langle k(x_i,\cdot),h\rangle_{\mathcal H_k}$. Hence
$$
\left.\frac d{d\epsilon}L(g+\epsilon h)\right|_{\epsilon=0}=\left\langle\sum_i(g(x_i)-y_i)k(x_i,\cdot),h\right\rangle_{\mathcal H_k}.
$$
Each kernel section belongs to the <Reproducing kernel Hilbert space>, so this finite sum is an admissible element. Uniqueness of a <vector> with these <inner products> gives the <functional gradient>
$$
\boxed{\nabla_gL(g)=\sum_{i=1}^n(g(x_i)-y_i)k(x_i,\cdot)}.
$$