Question on Linear and logistic regression

Hi @kaki178925

Sometimes fitting a streight line or a plane (w/ a linear model) is just not sufficient to model the relationship between your features and your label, especially if the relationship is a bit more complex.

In order to describe the non-linearity, feature engineering can do the trick which can involve:

When you have a manageable amount of features what always helps is to analyze the residuals to see where you have still systematic patterns left that you could potentially exploit in your feature engineering, see also:

In a perfect world you would just see some random (Gaussian) distribution in your residua and no systematic patterns:

Since your question also touches upon logistic regression, maybe this thread could be interesting for you, too: Can logistic regression be replaced with ordinary linear regression - #16 by Christian_Simonis

Hope that helps!

Best regards

1 Like