Kernel Regression function
kernel_reg(X, Y, x, h, kernel_func)Returns a scalar representing the estimated value of the regression function at the point x.
A numerical vector representing the sample data of variable X.
A numerical vector representing the sample data of variable Y.
The point at which the regression function is to be estimated.
A bandwidth parameter that determines the weight assigned to each observation in X.
A function that computes the weight of each observation based on its distance to x.