天天看点

TensorFlow训练Logistic回归

在用线性模型进行回归训练时,有时需要根据这个线性模型进行分类,则要找到一个单调可微的用于分类的函数将线性回归模型的预测值关联起来。这时就要用到逻辑回归,之前看吴军博士的《数学之美》中说腾讯和谷歌广告都有使用logistics回归算法。

如下图,可以清晰看到线性回归和逻辑回归的关系,一个线性方程被逻辑方程归一化后就成了逻辑回归。

TensorFlow训练Logistic回归
TensorFlow训练Logistic回归

如图,

TensorFlow训练Logistic回归

但阶跃函数不连续,于是用sigmoid函数替代之,为 

TensorFlow训练Logistic回归
TensorFlow训练Logistic回归
TensorFlow训练Logistic回归
TensorFlow训练Logistic回归

========广告时间========

<a href="http://blog.csdn.net/wangyangzhizhou/article/details/74080321">为什么写《Tomcat内核设计剖析》</a>

=========================

欢迎关注:

TensorFlow训练Logistic回归

继续阅读