HongYiLee Classification Notes

HongYiLee Classification Notes

标签: Notes MechineLearning DeepLearning Classification


Classification分类问题

Generative Model 生成模型

P(x)=P(x|C1)P(C1)+P(x)P(x|C2) P ( x ) = P ( x | C 1 ) P ( C 1 ) + P ( x ) P ( x | C 2 ) 通过先验概率 P(C1) P ( C 1 ) P(C2) P ( C 2 ) 生成 P(x) P ( x )

Prior 先验概率 P(C1) P ( C 1 ) P(C2) P ( C 2 )

Assume the points are sampled from a Gaussion Distribution高斯分布。
Given the points how to find the Gaussion Distribution.

But the Gaussion Distribution with any mean mu m u and covariance matrix Σ Σ can generative these points. So we use the Likelihood Function.似然函数。

We want to find the Maximum Likelihood on this Likelihood Function.
μ,Σ=argmaxμ,Σ(μ,Σ) μ ∗ , Σ ∗ = a r g m a x μ , Σ ( μ , Σ )
which: μ=1nni=1xi μ ∗ = 1 n ∑ i = 1 n x i
and: Σ=1nni=1(xix)(xix)T Σ ∗ = 1 n ∑ i = 1 n ( x i − x ∗ ) ( x i − x ∗ ) T

So Class1 is a Gaussion distribution and Class2 is a Gaussion distribution, once we get each μ,Σ μ , Σ of the distribution, we can caclate the problem.

How to Modifying the Model

Different Distribution can share the same Σ Σ . 应该要share怎么样的一个 Σ Σ 比较合适呢,可以将两个Class的 Σ Σ 加权平均。变成两个类共同share的一个协方差矩阵。
When We share the same covariance, the boundary become linear and the perfomance become better.当共用一个协方差矩阵的时候,边界变成了线性的并且表现变得更好。

Posterior Probabllity 后验概率(精彩推导,马上开始)

P(C1|x)=P(x|C1)P(C1)P(x|C1)P(C1)+P(x|2)P(C2)=11+P(x|C2)P(C2)P(x|C1)P(C1)=11+ez P ( C 1 | x ) = P ( x | C 1 ) P ( C 1 ) P ( x | C 1 ) P ( C 1 ) + P ( x | 2 ) P ( C 2 ) = 1 1 + P ( x | C 2 ) P ( C 2 ) P ( x | C 1 ) P ( C 1 ) = 1 1 + e − z

Here we let z=lnP(x|C1)P(C1)P(x|C2)P(C2) z = l n P ( x | C 1 ) P ( C 1 ) P ( x | C 2 ) P ( C 2 ) .看起来很眼熟吗?没错这就是 sigmod函数啦!
z=wTx+b z = w T x + b

P(C1|x)=11+ez=σ(z)=σ(wTx+b) P ( C 1 | x ) = 1 1 + e − z = σ ( z ) = σ ( w T x + b )

So we got Logistic Regression.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值