Loading...
Compute the polynomial kernel matrix between two sets of vectors.
The polynomial kernel is: K(x,y)=(x⋅y+c)d
Given two sets of vectors A (m points) and B (n points), compute the m×n kernel matrix where entry (i,j)=K(Ai,Bj).
Return the matrix with values rounded to 4 decimal places.
A = [[1, 2], [3, 4]] B = [[5, 6], [7, 8]] c = 1, d = 2
[[324, 576], [1600, 2916]]