I have a non-linear dataset. How can I do regression in orange
? Orange
does not have polynomial regression widget.
3 Answers
You have to add higher order polynomial terms to your dataset yourself. Accordingly, you should add new columns to your dataset which consists of higher order polynomials with the desired combination of the existing features. It means that if you have already a CSV
file which contains two columns for different samples, you have to add your desired extra feature columns which are the polynomial combination of the existing features. Then use simple regression.
In R: Try regression with a higher-order polynomial by adding I(variable^power)
to the regression formula. You don't need to add another column if you use polynomial terms in the lm function. e.g, if you want to add the quadratic of a certain variable called feature
:
lm(response_variable~feature + I(feature^2), data=Orange)