Hello. I’d like to know if it’s possible in KNIME to learn a non-linear regression model that is capable of dealing with categorical variables. More specifically, my problem has the following variables:
- Position in the plate with 5 levels (categorical):
- Top left
- Top right
- Bottom left
- Bottom right
- Orientation with 4 levels (categorical):
- Thickness (double)
- Energy density (integer)
- Pressure (double)
- Number of times reused (integer)
Mechanical resistance of the piece
that is possible if you convert the categorical values first. A common technique is One-hot encoding, where you make one column for each of the possible values. The column corresponding to the present value is set to 1, all others to 0. In KNIME this is done using the One to Many node. I hope that helps!
Hello @AlexanderFillbrunn. Thanks for your reply. I’ve done that, but my question is more related to the procedure after the encoding of the variables. Once I’ve done it, I can’t use a polynomial regression learner of degree 2 (because one cannot fit a parabola with 2 values like 0 or 1), and a linear model doesn’t correspond very well to the behaviour of the other variables. So in terms of modeling, what would you recommend me to do in this case?
how about using a Simple Regression Tree? Here you don’t even need one-hot encoding. If a single tree is not good enough or you don’t care about interpretability, one of the tree ensemble models might also be useful, e.g. Gradient Boosted Trees or Random Forest.
In fact once I’ve used the One to Many node, the polynomial regression worked (it ignored the coefficients for the degree 2 terms of the dummy variables), and the model has a good precision apparently. Thanks !!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.