Kernel Regression

Implement $k(z)$ and $f(x)$ to understand the method.

Make nonlinear toy data

with random $x \in [0, 3]$ and $y = e^x + \sin(x) + \epsilon$, where $\epsilon \sim N(0, 1)$

Look at what math formulas do, and what three scikit-learn kernels do:

Run this code chunk three times:

show_k_bell_curves = True show_f_from_formulas = False show_scikit_learn_model = False

show_k_bell_curves = True show_f_from_formulas = True show_scikit_learn_model = False

show_k_bell_curves = True show_f_from_formulas = True show_scikit_learn_model = True