# How to use a gaussian basis function

I am trying to build a linear regression model and one of my features when plotted against the output looks like a bell curve. So intuitively I figured that if I use the raw data for that feature my model won't be able to capture the non-linearity in it. So, I decided to use a Gaussian basis function only on that feature.

to do that I did the following code in Matlab x(:,1)=exp(-((x(:,1)-u).^2)./(2.*s.^2)) where u and s are the mean and standard deviation for that feature.

But I did not get any improvement in my model. Is there something wrong I am doing, or maybe perhaps something fundamentally wrong( I am new to machine learning and Data analytics).

• (1) These curves don't look very Gaussian. (2) What values of $u$ and $s$ did you supply? (3) What form of linear regression are you using? Ordinary Least Squares appears inappropriate because the vertical scatter in the tails is far, far less than in the middle. – whuber Apr 4 at 13:22