kernel_rbf#
- mvpy.math.kernel_rbf(x: ndarray | Tensor, y: ndarray | Tensor, γ: float, *args: Any) ndarray | Tensor[source]#
Compute the radial basis kernel function.
- Parameters:
- xUnion[np.ndarray, torch.Tensor]
Matrix x of shape (n_samples, n_features).
- yUnion[np.ndarray, torch.Tensor]
Matrix y of shape (n_samples, n_features).
- γfloat
Gamma parameter as float.
- Returns:
- kUnion[np.ndarray, torch.Tensor]
Kernel matrix of shape (n_samples, n_samples).
vert vert^2
Note that, unlike other math functions, this is specifically for 2D inputs and outputs.