Classification and Logistic Regression

一、Classification: Probabilistic Generative Model

Ideal Alternatives

Function (Model):
在这里插入图片描述
Loss function:
在这里插入图片描述
The number of times f get incorrect results on training data.

Find the best function:
Example: Perceptron, SVM

Classification as Regression?
Binary classification as example :
Training: Class 1 means the target is 1; Class 2 means the target is -1
Testing: closer to 1 → class 1; closer to -1 → class 2
在这里插入图片描述

Penalize to the examples that are “too correct”

Multiple class: Class 1 means the target is 1; Class 2 means the target is 2; Class 3 means the target is 3 …… problematic

Two Boxes example

在这里插入图片描述

From one of the boxes,where does it come from?
在这里插入图片描述

Two Classes

Estimating the Probabilities From training data
在这里插入图片描述
Given an x, which class does it belong to
在这里插入图片描述
在这里插入图片描述

Gaussian Distribution

在这里插入图片描述
Input: vector x, output: probability of sampling x
The shape of the function determines by mean μ and covariance matrix Σ
在这里插入图片描述

Probability from Class

在这里插入图片描述

Maximum Likelihood

在这里插入图片描述
在这里插入图片描述
The Gaussian with any mean μ and covariance matrix Σ can generate these points

在这里插入图片描述
Likelihood of a Gaussian with mean μ and covariance matrix Σ = the probability of the Gaussian samples x1,x2,x^3, …… ,x^79
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Now we can do classification

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Testing data: 47% accuracy
All: hp, att, sp att,
de, sp de, speed (6 features)
在这里插入图片描述
Modifying Model:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

All: hp, att, sp att, de, sp de, speed

Three Steps

Function Set (Model):
在这里插入图片描述
Goodness of a function:
The mean μ and covariance Σ that maximizing the likelihood (the probability of generating data)
Find the best function: easy

Probability Distribution
在这里插入图片描述
Posterior Probability:
在这里插入图片描述

二、Classification: Logistic Regression

Step 1: Function Set

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Step 2: Goodness of a Function

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Step 3: Find the best function

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Logistic Regression + Square Error

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Generative v.s. Discriminative

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Usually people believe discriminative model is better
Benefit of generative model
With the assumption of probability distribution
less training data is needed
more robust to the noise
Priors and class-dependent probabilities can be estimated from different sources.

Multi-class Classification

在这里插入图片描述
在这里插入图片描述

Limitation of Logistic Regression

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

总结

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值