一、二元分类的线性模型

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

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

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

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

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

理论分析上界

11 Linear Models for Classification-LMLPHP

将回归应用于分类

11 Linear Models for Classification-LMLPHP

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

二、随机梯度下降

两种迭代优化模式

11 Linear Models for Classification-LMLPHP

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

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

11 Linear Models for Classification-LMLPHP

SGD与PLA的相似性

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

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

步长常取0.1

11 Linear Models for Classification-LMLPHP

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

是非题---》选择题

11 Linear Models for Classification-LMLPHP

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

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

结果出现问题

11 Linear Models for Classification-LMLPHP

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

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

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

11 Linear Models for Classification-LMLPHP

OVA总结

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

11 Linear Models for Classification-LMLPHP

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

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

为更加平衡,使用OVO

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

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

11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP11 Linear Models for Classification-LMLPHP

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

11 Linear Models for Classification-LMLPHP

OVO总结

11 Linear Models for Classification-LMLPHP

OVA vs OVO

11 Linear Models for Classification-LMLPHP

05-06 05:06