scope_rl.utils.cosine_kernel#
- scope_rl.utils.cosine_kernel(x, y, bandwidth=1.0)[source]#
Cosine kernel.
- x: array-like of shape (n_samples, n_dim)
Input array 1.
- y: array-like of shape (n_samples, n_dim)
Input array 2.
- bandwidth: float, default=1.0
Bandwidth hyperparameter of the Trianglar kernel.
- Returns:
kernel_density – kernel density of x given y.
- Return type:
ndarray of (n_samples, )