Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any module for Non_Linear Logistic regression in Python sklearn?

In the package sklearn available here - Github/Sklearn we see linear_model module which is very well used for logistic regression ML problems. I'm successful in implementing that for datasets, decision boundary of which can be separated by a straight line. But the question is how can one implement logisitc regression for non-linear models.

I tried searching the library (in the above guithub link) if it contains any relevant module, but couldn't. Is there a way to deal with non-linear problems from sklearn? (apart from clustering algorithms) Are there any other library to help with non-linear regression ? Suggestions are welcome.

like image 953
Bhanu Chander Avatar asked Oct 15 '25 02:10

Bhanu Chander


1 Answers

One way you can do it is adding the non-linear features you think you'll need to your data set. For example if you think quadratic terms in one variable will help (they'll let you fit orthogonal ellipses), then append x^2, y^2, ... columns to your data matrix of x, y, ... . Then run linear methods on this.

like image 136
Denziloe Avatar answered Oct 16 '25 17:10

Denziloe