机器学习笔记之生成模型综述(二)监督学习与无监督学习

本文概述了机器学习中的生成模型,包括在监督学习和无监督学习中的应用。生成模型关注于建模对象是否在样本分布本身,如朴素贝叶斯分类器。在监督学习中,概率模型分为非概率模型(如感知机、线性判别分析)和概率模型(如逻辑回归)。无监督学习中的概率模型主要是生成模型,如高斯混合模型和高斯过程。此外,文章讨论了概率图模型、深度学习模型,如受限玻尔兹曼机、深度信念网络和变分自编码器等。
摘要由CSDN通过智能技术生成

引言

上一节介绍了生成模型的判别方式,本节将从机器学习需要解决的任务——监督学习、无监督学习的角度,对现阶段经典模型进行总结。

回顾:生成模型介绍

判别方式:生成模型 VS \text{VS} VS 判别模型

生成模型( Generative Model \text{Generative Model} Generative Model)的核心判别方式是:建模所关注的对象是否在样本分布自身。例如逻辑回归朴素贝叶斯分类器。虽然这两个算法均处理基于监督学习的分类任务,并且均是软分类算法,但关注点截然不同:

  • 逻辑回归( Logistic Regression \text{Logistic Regression} Logistic Regression)的底层逻辑是最大熵原理,通过 Sigmoid , Softmax \text{Sigmoid},\text{Softmax} Sigmoid,Softmax函数直接对后验概率 P ( Y ∣ X ) \mathcal P(\mathcal Y \mid \mathcal X) P(YX)进行描述:
    以二分类为例,此时 Y \mathcal Y Y服从伯努利分布。
    P ( Y ∣ X ) = { Sigmoid ( W T X + b ) Y = 1 1 − Sigmoid ( W T X + b ) Y = 0 \mathcal P(\mathcal Y \mid \mathcal X) = \begin{cases} \text{Sigmoid}(\mathcal W^T\mathcal X + b) \quad \mathcal Y = 1\\ 1 - \text{Sigmoid}(\mathcal W^T\mathcal X + b) \quad \mathcal Y = 0 \end{cases} P(YX)={ Sigmoid(WTX+b)Y=11Sigmoid(WTX+b)Y=0
    很明显,这里我们仅关注 Sigmoid \text{Sigmoid} Sigmoid函数结果。而 X \mathcal X X的特征信息仅作为与模型参数 W \mathcal W W做内积的工具而已,并不是我们关注的对象;

  • 朴素贝叶斯分类器( Naive Bayes Classifier \text{Naive Bayes Classifier} Naive Bayes Classifier)针对后验概率 P ( Y ∣ X ) \mathcal P(\mathcal Y \mid \mathcal X) P(YX),通过贝叶斯定理将其转化为 P ( X ∣ Y ) ⋅ P ( Y ) \mathcal P(\mathcal X \mid \mathcal Y) \cdot \mathcal P(\mathcal Y) P(XY)P(Y)之间的大小关系:

    • 关于分母 P ( X ) \mathcal P(\mathcal X) P(X)的完整形式是 ∫ Y P ( X ∣ Y ) ⋅ P ( Y ) d Y \int_{\mathcal Y}\mathcal P(\mathcal X \mid \mathcal Y) \cdot \mathcal P(\mathcal Y) d\mathcal Y YP(XY)P(Y)dY,该项自身与 Y \mathcal Y Y无关,可视作常数。
    • 这里依然以二分类为例, Y \mathcal Y Y同样服从伯努利分布。
      P ( Y ∣ X ) = P ( X , Y ) P ( X ) ∝ P ( X , Y ) = P ( X ∣ Y ) ⋅ P ( Y ) P ( X ∣ Y = 0 ) ⋅ P ( Y = 0 ) ⇔ ? P ( X ∣ Y = 1 ) ⋅ P ( Y = 1 ) \begin{aligned} \mathcal P(\mathcal Y \mid \mathcal X) = \frac{\mathcal P(\mathcal X,\mathcal Y)}{\mathcal P(\mathcal X)} \propto \mathcal P(\mathcal X,\mathcal Y) = \mathcal P(\mathcal X \mid \mathcal Y) \cdot \mathcal P(\mathcal Y) \\ \mathcal P(\mathcal X \mid \mathcal Y = 0) \cdot \mathcal P(\mathcal Y = 0) \overset{\text{?}}{\Leftrightarrow} \mathcal P(\mathcal X \mid \mathcal Y = 1) \cdot \mathcal P(\mathcal Y = 1) \end{aligned} P(YX)=P(X)P(X,Y)P(X,Y)=P(XY)P(Y)P(XY=0)P(Y=0)?P(XY=1)P(Y=1)

    在这里,我们关注的对象是联合概率分布 P ( X , Y ) \mathcal P(\mathcal X,\mathcal Y) P(X,Y)。并且针对 P ( X , Y ) \mathcal P(\mathcal X,\mathcal Y) P(X,Y)建模的过程中,设计了朴素贝叶斯假设
    { x i ⊥ x j ∣ Y ( i ≠ j ; x i , x j ∈ X ; X ∈ R p ) P ( X ∣ Y ) = P ( x 1 , ⋯   , x p ∣ Y ) = ∏ i = 1 p P ( x i ∣ Y ) \begin{cases} x_i \perp x_j \mid \mathcal Y \quad (i\neq j;x_i,x_j \in \mathcal X;\mathcal X \in \mathbb R^p) \\ \mathcal P(\mathcal X \mid \mathcal Y) = \mathcal P(x_1,\cdots,x_p \mid \mathcal Y) = \prod_{i=1}^p \mathcal P(x_i \mid \mathcal Y) \end{cases} { xixjY(i=j;xi,xjX;XRp)P(XY)=P(x1,,xpY)=i=1pP(xiY)

生成模型的建模手段

如果针对监督学习,自带标签信息 Y \mathcal Y Y,例如朴素贝叶斯分类器,通常针对联合概率分布 P ( X , Y ) \mathcal P(\mathcal X,\mathcal Y) P(X,Y)进行建模;

如果是无监督学习,此时只有样本特征 X \mathcal X X,主要分为两种情况:

  • 自回归模型( Autoregressive Model,AR \text{Autoregressive Model,AR} Autoregressive Model,AR),它直接对 P ( X ) \mathcal P(\mathcal X) P(X)自身进行建模;
  • 隐变量模型( Latent Variable Model,LVM \text{Latent Variable Model,LVM} Latent Variable Model,LVM),通过假设隐变量 Z \mathcal Z Z,对联合概率分布 P ( X , Z ) \mathcal P(\mathcal X,\mathcal Z) P(X,Z)进行建模。

监督学习与无监督学习

机器学习任务的角度观察:

无论是监督学习还是无监督学习,都可以将其划分为概率模型非概率模型
这里的概率模型/非概率模型是指:在建模的过程中,其关于任务的返回结果是否考虑了概率分布。换句话说,概率是否直接参与到相关任务中去。

监督学习模型

基于监督学习的非概率模型

监督学习中的非概率模型,大方向指的是判别模型。在分类任务中,硬分类模型都是非概率模型。

  • 感知机算法( Perceptron Linear Alpgorithm,PLA \text{Perceptron Linear Alpgorithm,PLA} Perceptron Linear Alpgorithm,PLA)硬分类任务的对应模型均表示特征空间的超平面。区别在于样本划分的策略(模型表示后略):
    其中 Sign \text{Sign} Sign函数表示指示函数,在硬分类任务中,其大多指的是分段函数;而在软分类任务中,它可以是如 Sigmoid \text{Sigmoid} Sigmoid函数的连续函数。
    Y = Sign ( W T X + b ) \mathcal Y = \text{Sign}(\mathcal W^T\mathcal X + b) Y=Sign(WTX+b)
    感知机算法的策略是错误驱动
    { L ( W , b ) = ∑ ( x ( i ) , y ( i ) ∈ D ) − y ( i ) ( W T x ( i ) + b ) arg ⁡ min ⁡ W , b L ( W , b ) \begin{cases} \mathcal L(\mathcal W,b) = \sum_{(x^{(i)},y^{(i)} \in \mathcal D)} -y^{(i)}\left(\mathcal W^Tx^{(i)} + b \right) \\ \mathop{\arg\min}\limits_{\mathcal W,b} \mathcal L(\mathcal W,b) \end{cases} L(W,b)=(x(i),y(i)D)y(i)(WTx(i)+b)W,bargminL(W,b)
  • 硬间隔-支持向量机( Support Vector Machine,SVM \text{Support Vector Machine,SVM} Support Vector Machine,SVM),区别其他的硬分类模型,它是一个带约束的优化问题
    { min ⁡ W , b 1 2 W T W s . t . y ( i ) ( W T x ( i ) + b ) ≥ 1 ( x ( i ) , y ( i ) ) ∈ D \begin{cases} \mathop{\min}\limits_{\mathcal W,b} \frac{1}{2}\mathcal W^T\mathcal W \\ s.t. y^{(i)} \left(\mathcal W^Tx^{(i)} + b\right) \geq 1 \quad (x^{(i)},y^{(i)}) \in \mathcal D \end{cases} W,bmin21WTWs.t.y(i)(WTx(i)+b)1(x(i),y(i))D
  • 线性判别分析( Linear Discriminant Analysis,LDA \text{Linear Discriminant Analysis,LDA} Linear Discriminant Analysis,LDA):以二分类为例,通过描述被超平面划分样本点的类内、类间关系,来确定模型参数信息。其策略表示如下:
    J ( W ) = ( Z 1 ˉ − Z 2 ) 2 ˉ S 1 + S 2 = W T ( X C 1 ˉ − X C 2 ˉ ) ( X C 1 ˉ − X C 2 ˉ ) T W W T ( S C 1 + S C 2 ) W { S C 1 = 1 N 1 ∑ i = 1 N 1 ( x
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

静静的喝酒

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值