当前位置:网站首页>13.逻辑回归
13.逻辑回归
2022-07-27 05:13:00 【派大星的最爱海绵宝宝】
逻辑回归logistic regression的概念已经被classification代替掉。
对于一个问题是否是logistic regression或classification已经不重要了。
回归和分类对比
1.回归问题
目标:使得pred=y
方法:减少pred和y的差距(pred和y的平方差)
2.分类
目标:最大化benchmar或accuracy等
方法1:减少dist(pθ(y|x),pr(y|x)),在θ条件上的y的条件概率分布与真实情况下的条件概率分布,使两者越接近越好
方法2:减少散度diviergence(pθ(y|x),pr(y|x))
问题
问题一:为什么不直接最大化accuracy
直接最大化accuracy会有以下两个问题
问题1:梯度为0,当数值weights变化时,accuracy没有变化。
对于分类,有一个阈值,假设阈值为0.5时,即使你的预测从0.4上升到0.49,更加接近真实值,但是因为没有超过阈值0.5,所以最后的accuracy值依然没有发生改变。相当于x变了,y没有变,y对x求的梯度为0.
问题2:梯度不连续,正确的数量不连续时。
当weights发生很小的变化时,也可能会跨过阈值,导致accuracy突变,使得梯度不稳定或者梯度爆炸。
问题二:为什么叫逻辑回归
使用sigmod
争议:(龙良曲老师总结)
MSE->regression
cross entropy->classification
使用两种不同方法求解loss,可以看作不同的问题
边栏推荐
- Face brushing payment is more in line with Alipay's concept of always being ecological
- MySQL索引分析除了EXPLAIN还有什么方法
- mysql优化sql相关(持续补充)
- Which futures company has a low handling fee and a high refund?
- If you encounter oom online, how to solve it?
- Amazon evaluation autotrophic number, how to carry out systematic learning?
- PHP 实现与MySQL的数据交互
- What are alpha and beta tests?
- 【好文种草】根域名的知识 - 阮一峰的网络日志
- 手把手教你搭建钉钉预警机器人
猜你喜欢

kettle的文件名通配规则

根据文本自动生成UML时序图(draw.io格式)

机器人编程与交叉学科的融合延伸

Emoji表情符号用于文本情感分析-Improving sentiment analysis accuracy with emoji embedding

How does gamefi break the circle? Aquanee shows its style by real "p2e"

如果在线上遇到了OOM,该如何解决?

How to apply for the return of futures account opening company?

inno setup 打包 jar + h5 + mysql + redis 成 exe

The NFT market pattern has not changed. Can okaleido set off a new round of waves?

你真的了解 Session 和 Cookie 吗?
随机推荐
MySQL二级索引中的主键——MySQL存在大量相同数据分页查询优化
2022/7/26 考试总结
How does gamefi break the circle? Aquanee shows its style by real "p2e"
记一次PG主从搭建及数据同步性能测试流程
Dimitra and ocean protocol interpret the secrets behind agricultural data
golang封装mysql涉及到的包以及sqlx和gorm的区别
Face brushing payment is more in line with Alipay's concept of always being ecological
Deploy redis with docker for high availability master-slave replication
inno setup 打包 jar + h5 + mysql + redis 成 exe
机器人编程与交叉学科的融合延伸
Mysql5.7版本如何实现主从同步
GBASE 8C——SQL参考6 sql语法(15)
Fortex Fangda releases the electronic trading ecosystem to share and win-win with customers
亚马逊测评自养号,如何进行系统性的学习?
Seven enabling schemes of m-dao help Dao ecology move towards mode and standardization
解决MySQL JDBC数据批量插入慢的问题
存储过程试炼1--爱的初相识
Getaverse, a distant bridge to Web3
GBASE 8C——SQL参考6 sql语法(11)
GBASE 8C——SQL参考6 sql语法(11)