用Python开始机器学习(7:逻辑回归分类) –好!!

from : http://blog.csdn.net/lsldd/article/details/41551797

在本系列文章中提到过用Python开始机器学习(3:数据拟合与广义线性回归)中提到过回归算法来进行数值预测。逻辑回归算法本质还是回归,只是其引入了逻辑函数来帮助其分类。实践发现,逻辑回归在文本分类领域表现的也很优秀。现在让我们来一探究竟。

1、逻辑函数

假设数据集有n个独立的特征,x1到xn是样本的n个特征。传统回归算法的目标是拟合一个多项式函数,以最小化预测值和实际值之间的误差。

[En]

Suppose the dataset has n independent features, and x1 to xn are the n features of the sample. The goal of the conventional regression algorithm is to fit a polynomial function to minimize the error between the predicted value and the real value.

用Python开始机器学习(7:逻辑回归分类) --好!!

我们希望这样的f(X)能够具有良好的逻辑判断性质,最好是直接表示具有特征x的样本被分配到某一类的概率。例如,当f(X)>0.5时,可能意味着x被归类为正类,f(X)

[En]

We hope that such f (x) can have a good logical judgment property, and it is best to directly express the probability that the sample with characteristic x is assigned to a certain class. For example, when f (x) > 0.5, it can mean that x is classified as positive class, f (x)

Original: https://www.cnblogs.com/zhizhan/p/6002266.html
Author: 止战F
Title: 用Python开始机器学习(7:逻辑回归分类) –好!!

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/6307/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总