机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

时间:2022-01-16 16:15:17

Lecture 2: Learning to Answer Yes/No


机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Perceptron

A Simple Hypothesis Set: the ‘Perceptron’

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

感知器类比神经网络,threshold类比考试60分及格

Vector Form of Perceptron Hypothesis

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
each ‘tall’ W represents a hypothesis h & is multiplied with ‘tall’ X —will use tall versions to simplify notation

Perceptrons in R2

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Fun time

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Select g from H

遍历是不现实的,所以还是迭代吧
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Perceptron Learning Algorithm

A fault confessed is half redressed.

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
因为 wTtxn(t)=wtxn(t)cos(wt,xn(t)) ,所以当二者夹角大于90°的时候,内积为-,反之为+

Fun time

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

说明了什么含义 为什么不对?

Implementation

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
start from some w0 (say, 0,并不是随机的初始化), and ‘correct’ its mistakes on D next can follow naïve cycle (1, · · · , N) or precomputed random cycle
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

(note: made xix0=1 for visual purpose) Why ?

Issues of PLA

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Linear Separability

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
assume linear separable D ,does PLA always halt?

halts!

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
因为 wTfwTwfwT<=1 ,所以T肯定有上限

PLA Fact: wt Gets More Aligned with wf

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

wt appears more aligned with wf after update really?

PLA Fact: wt Does Not Grow Too Fast
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No
wTfwTwTfwT1+minnynwTfxnwfw0+TminnynwTfxnTminnynwTfxnρTwf2(A)
wT2wT12+maxnynxnw02+Tmaxynxn2Tmaxynxn2TR2(B)
推导过程中需要注意的是, w0=0 ,然后将(A)(B)代入即可得答案为

得到是上限,而且无法准确求出,因为 wf 未知
即使 w00 也是能证明有上限的

特性

机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Learning with Noisy Data

NP难问题
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No

Pocket Algorithm

modify PLA algorithm (black lines) by keeping best weights in pocket
机器学习基石笔记 Lecture 2: Learning to Answer Yes/No