You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this PPT page, when calculating the Gaussian kernel function, the square operation is performed after the two norms.
But the code, there is no square.
def_caculate_gauss_kernel(self, x, sv_x):
n, dimension1=sv_x.shapem, dimension2=x.shapeassert(dimension1==dimension2)
graph1=np.repeat(np.expand_dims(x, axis=0), n, axis=0)
graph2=np.repeat(np.expand_dims(sv_x, axis=0), m, axis=0).transpose(1,0,2)
kernel_value=np.exp(-self.gamma*np.linalg.norm(graph1-graph2, axis=-1))
returnkernel_value
Is there any error? Or I am just wrongly understood your code.
The text was updated successfully, but these errors were encountered:
In this PPT page, when calculating the Gaussian kernel function, the square operation is performed after the two norms.
But the code, there is no square.
Is there any error? Or I am just wrongly understood your code.
The text was updated successfully, but these errors were encountered: