which power of the feature should i train with? regression

44 views Asked by At

I have a explanatory variable x and a response variable y. I am trying to find which power of the feature i should train with. You can ignore the colors for my question. the scatter data is from the sensor and the line plot is the theoretical curve from the lab, which you can also ignore for my question.

enter image description here

1

There are 1 answers

1
Bluexm On

For this answer I understand you want to obtain some polynomial curve going through the croissant shaped zone where points are dense.

Also I assume that the independent variable is on the horizontal axis, while the dependent is on the vertical one. Otherwise as you can see from the blue line, there is no functional that could give you this.

Now to select the degree of polynomial you can use stepwise regression. This is about running the regression with more or less features one at a time (i.e decrease or increase the degree of polynomial in this case), and calculating a score such as AIC, BIC, or even adjusted R2 to assess if it's worth it or not to add or remove this feature.