简体   繁体   English

Python sklearn 中是否有用于非线性逻辑回归的模块?

[英]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.在此处提供的sklearn包中 - Github/Sklearn我们看到了linear_model模块,它非常适合用于logistic regression ML 问题。 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 .但问题是如何为non-linear models实现逻辑回归。

I tried searching the library (in the above guithub link) if it contains any relevant module, but couldn't.如果它包含任何相关模块,我尝试搜索库(在上面的 guithub 链接中),但不能。 Is there a way to deal with non-linear problems from sklearn?有没有办法处理 sklearn 中的非线性问题? (apart from clustering algorithms) Are there any other library to help with non-linear regression ? (除了聚类算法)还有其他库可以帮助进行非线性回归吗? Suggestions are welcome.欢迎提出建议。

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, ... .例如,如果您认为一个变量中的二次项会有所帮助(它们会让您拟合正交椭圆),那么将 x^2, y^2, ... 列附加到 x, y, ... 的数据矩阵中。 Then run linear methods on this.然后对此运行线性方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM