RBF (Gaussian) Kernel Function
Instance-Based, Kernel & Probabilistic Methods DS practice problem on Onlearn.
Difficulty: medium.
Topics: Understanding Kernel Methods and Non-linear Feature Mapping, Squared Euclidean Distance, Gamma Bandwidth Parameter, Exponentiation of Negative Quadratic Forms, Broadcasting in NumPy, Kernel Trick, Linear Algebra, Statistical Learning Theory, Optimization, Kernel Methods, Vector Calculus, Support Vector Machines, Mercer's Theorem, Feature Space Mapping, Distance Metrics, Hyperparameter Tuning.
Implement the Radial Basis Function (RBF) kernel, also known as the Gaussian kernel. Given two input vectors x and y, and a bandwidth parameter gamma, the function should return the scalar result of exp( gamma ||x y||^2). Ensure the implementation handles NumPy arrays for high performance computation.