11 Linear Models for Classification

一、二元分类的线性模型

线性分类、线性回归、逻辑回归

11 Linear Models for Classification11 Linear Models for Classification

可视化这三个线性模型的代价函数

SQR、SCE的值都是大于等于0/1的

11 Linear Models for Classification11 Linear Models for Classification

理论分析上界

11 Linear Models for Classification

将回归应用于分类

11 Linear Models for Classification

线性回归后的参数值常用于pla/pa/logistic regression的参数初始化

二、随机梯度下降

两种迭代优化模式

11 Linear Models for Classification

利用全部样本---》利用随机的单个样本,

梯度下降---》随机梯度下降

11 Linear Models for Classification

SGD与PLA的相似性

11 Linear Models for Classification11 Linear Models for Classification

当迭代次数足够多时,停止

步长常取0.1

11 Linear Models for Classification

三、使用逻辑回归的多分类问题

是非题---》选择题

11 Linear Models for Classification

每次识别一类A,将其他类都视作非A类

11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification

结果出现问题

11 Linear Models for Classification

将是不是A类变为是A类的可能性:软分类

11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification

分别计算属于某类的概率,取概率值最大的类为最后的分类结果

11 Linear Models for Classification

OVA总结

注意每次计算一类概率时都得利用全部样本

11 Linear Models for Classification

四、使用二元分类的多分类问题

OVA经常不平衡,即属于某类的样本过多时,分类结果往往倾向于该类

为更加平衡,使用OVO

OVA保留一类,其他为非该类,每次利用全部样本;

OVO保留两类,每次只利用属于这两类的样本

11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification11 Linear Models for Classification

通过投票得出最终分类结果

11 Linear Models for Classification

OVO总结

11 Linear Models for Classification

OVA vs OVO

11 Linear Models for Classification

上一篇:CentOS 相关软件安装 与 Siege压测


下一篇:MySQL 在线开启&关闭GTID模式