Hacker News new | ask | show | jobs
by alok-g 2 days ago
Thanks. I think I have a better understanding now, though still not having a complete grasp.

>> f(x) = r_1 + x r_2*

>> The right-hand plot shows the output of the kernel function for two indices x and x'.

The kernel function here would be k(x, x') = Cov[f(x), f(x')] = Cov[f(r_1 + x * r_2), f(r_1 + x' * r_2)].

In this case, I am guessing we should be able to figure what k(x, x') would be, but perhaps would not be x * x' for this case. x * x' sounds to be a very special case.

1 comments

> k(x, x') = Cov[f(x), f(x')] = Cov[f(r_1 + x * r_2), f(r_1 + x' * r_2)].

As I understand it, it would instead be

  k(x, x') = Cov[f(x), f(x')] = Cov[r_1 + x * r_2, r_1 + x' * r_2]
I admit I haven't run through the full math. Given the definition of covariance I see how you get the x * x' term, but you're right in that it's not immediately obvious the other parts cancel fully.
So working the math a bit, it seems clear the author implicitly assumes the random variables follows a standard normal distribution, so zero mean (E[r] = 0) and unit variance (Var(r) = 1). In that case, you end up with a lot of E[...] = 0 and Var(...) = 1 terms and are left with the x*x' cross term.
And then in the general case, the answer I guess would be a additive superposition of multiple functions including x.x' ... Hence, x.x' serves for purposes of explanation that the original author is aiming for.
Thanks for the correction; silly miss on my part.