Loading...
Compute the Radial Basis Function (RBF/Gaussian) kernel matrix.
The RBF kernel is: K(x,y)=exp(−2σ2∥x−y∥2)
Given a set of vectors X (n points) and parameter σ, compute the n×n kernel matrix.
Return the matrix with values rounded to 4 decimal places. The diagonal should be all 1.0 (each point compared to itself).
X = [[0, 0], [1, 0], [0, 1]] sigma = 1.0
[[1.0, 0.6065, 0.6065], [0.6065, 1.0, 0.3679], [0.6065, 0.3679, 1.0]]