Nhan Dang1

Embed Size (px)

Text of Nhan Dang1

Pattern RecognitionThS.Trn thanh hng 0988565130 hungttbk@gmail.com

Chng I. Tng quan v nhn dngnh ngha: Nhn dng i tng l mt qu trnh phn hoch i tng thnh cc i tng con, chng c gn vo tng lp nhn c i snh vi mu v i snh theo cc quy lut bit trc no .

Nhng gii hn ca bi ton nhn dng Qu trnh Nhn dng: Dng 1: Nhn dng cc i tng c th: k t, hnh nh, ... Dng 2: Nhn dng cc i tng tru tng: vn , khi nim, ... Ch kho st bi ton thuc dng 1; Nhn dng i tng a v nghin cu cc c im:khng gian v thi gian: Cc i tng theo c trng khng gian: k t, du vn tay, bn , i tng vt l; Cc i tng theo c trng thi gian: ting ni, tn hiu in t, chui thi gian.

Gii hn 1:

Nhng gii hn ca bi ton nhn dng Nhng hng nghin cu ca lnh vc Nhn dng:

Gii hn 2: Ch quan tm ti cch tip cn th hai gii quyt bi ton nhn dng Bi ton nhn dng: a ( phn chia ) nhng d liu vo cc phn nhm xc nh da trn nhng tnh cht hoc du hiu c trng cho d liu.

Nghin cu kh nng nhn dng ca cc h thng sinh hc (ngi, ng vt): lin quan ti cc lnh vc nh tm l, sinh hc, sinh l hc, ; Pht trin cc phng php v l thuyt xy dng nhng thit b, chng trnh gii quyt bi ton nhn dng trong nhng lnh vc c th.

Nhng bi ton Nhn dng c bn V d bi ton nhn dng: Phn loi c trong dy chuyn thnh hai loi Cc bc thc hin: Tin x l nh c nhn c t camera Phn vng i tng(c) Trch chn cc c trng: sng, chiu di, chiu rng Phn loi i tng ( c )

Nhng bi ton Nhn dng c bn M hnh ca qu trnh nhn dng

Qu trnh xy dng h thng nhn dng

Nhng bi ton Nhn dng c bn Nhng c s: Khng gian o c; Cc c trng; B phn loi; Cc bin gii quyt nh; Cc mu hun luyn; Xc sut li

Gi thit: trong cc d liu c quan st tn ti tnh quy lut t vn : da trn cc quan st b nhiu, xc nh tnh quy lut trong d liu. Cc hng tip cn: thng k v cu trc.

Nhng bi ton Nhn dng c bn Tip cn thng k v cu trc Tip cn thng k: cc i tng c c trng bng s tng hp thng k. V d cc k t 2 u c chung mt s thuc tnh thng k.

Tip cn cu trc: cc cu trc c biu din bng cng mt c ch xy dng. V d cc cu trong mt ngn ng.

Nhng bi ton Nhn dng c bn Nhng kh khn c bn: Phn vng i tng; Xc nh cc c trng; Tnh bt bin; Ng cnh; Nhiu.

Minh ha nhng kh khn:

Nhng bi ton Nhn dng c bn Nhng bi ton c bn: Thu nhn v tin x l d liu vo; Biu din d liu: Qu trnh m ha; Biu din khng gian vector;

Trch chn c trng: Xc nh cc c im ca i tng; Gim s chiu biu din ca vector i tng;

Xy dng b phn loi: Xc nh nhng th tc ti u trong vic xc nh v phn loi i tng M hnh: Phn loi N lp i tng 1, 2, , N; M hnh b phn loi theo hm quyt nh

Nhng bi ton Nhn dng c bn H thng nhn dng thch nghi

Nhng bi ton Nhn dng c bn Bi ton hun luyn ( learning ) t vn :tn ti hay khng mt phng php gii quyt trit bi ton phn loi, nhn dng? Kt lun: kinh nghim 40 nm nghin cu cho thy: khng tn ti mt phng php nh vy. Nguyn nhn: bi ton t ra thuc nhm ill-posed Cch tip cn: learning: gii quyt vn da trn qu trnh hun luyn qua mu Hun luyn:phng php s dng nhng thng tin kinh nghim t mi trng kt hp vi nhng tri thc c sn xy dng cc b phn loi v qu trnh hiu chnh tng bc hiu qu phn loi. Nhng thng tin kinh nghim: cc mu hun luyn; Nhng tri thc: cc bt bin, hm tng quan; Qu trnh hiu chnh tng bc hiu qu phn loi.

Nhng bi ton Nhn dng c bn Cc phng php hun luyn: Hc c gim st: c thng tin phn loi km theo mu; Hc khng gim st: hon ton khng c thng tin t mi trng; Hc tng cng: c thng tin phn hi tng phn t mi trng.

Nhng bi ton Nhn dng c bn

Nhng nguyn l Nhn dng Cc nguyn l nhn dng c trng ca cc phn lp: c trng ca cc phn lp: Lit k nhng phn t tham gia vo phn lp; Nhng thuc tnh chung nht ca cc phn t thuc phn lp. Nh vy h nhn dng c xy dng trn nguyn l tng qut ha c im.

Khi kho st cc phn lp, nu d liu c xu hng to thnh cc phn cm ( cluster ) trong khng gian i tng. Khi nhn dng s dng nguyn l phn cm.

Nhng nguyn l Nhn dng Nguyn l lit k phn t Cc phn lp c c trng bng lit k cc i tng tham gia vo phn lp; Qu trnh t ng nhn dng a v bi ton i snh mu; Tp hp i tng ca mt phn lp c lu tr trong b nh; Khi xut hin i tng mi, h thng nhn dng ln lt i snh i tng vi cc mu lu tr. Qu trnh quyt nh: i tng s thuc phn lp cha mu ging nht vi i tng. Phng php n gin. Vn : la chn tp hp mu ti u.

Nhng nguyn l Nhn dng Nguyn l xc nh cc tnh cht chung Cc phn lp c c trng bng nhng c im chung ca cc phn t tham gia; Qu trnh nhn dng bao gm vic tm nhng c im chung trn i tng; Gi thit quan trng: Nhng i tng trong mt phn lp phi c nhng c im chung. Do cn gi thit v tnh tng ng gia nhng i tng trong nhm. Cc tnh cht chung c lu tr trong b nh. Khi c mt i tng xut hin, h thng cn phi m ha i tng v so snh vi nhng c im c lu tr; u im: so vi phng php lit k, c u im v mt lu tr, nhn dng v bn vng hn vi cc bin dng

Nhng nguyn l Nhn dng Nguyn l phn cm Cc i tng ca phn lp c biu din bng cc vector c thnh phn thc; Cc phn lp c coi l phn cm: nhng phn t trong mt lp th co cm, nhng phn t khng thuc lp th gin cch; H thng nhn dng da trn nguyn l ny c xc nh bng nhng phn b tng i gia cc lp. V d: phn loi bng khong cch nh nht Nu cc nhm phn tch: khng c vn ln ny sinh; Nu cc nhm khng phn tch: cn c nhng tiu ch phn loi phc tp hn; S che ph gia cc nhm l kt qu ca vic thiu thng tin do nhiu.

Nhng phng php Nhn dng Phng php Heuristic (mo) C s ca phng php heuristic l s dng kinh nghim ca ngi gim st; S dng nguyn l lit k phn t v tm cc c im chung ca i tng; Xy dng thut ton ph thuc vo tng bi ton c th; Ph thuc nhiu vo kinh nghim. Cc lut phn loi da trn nhng biu din ton hc ca cc c im i tng; Da vo nguyn l tm cc c im chung v nguyn l phn nhm; c im khc bit vi phng php heuristic: li gii c xc nh bng cc quy tc lin quan cht ch vi thuc tnh ca bi ton;

Phng php ton hc

Nhng phng php Nhn dng C hai dng phng php ton hc: Phng php thng k: s dng cng c ca thng k ton hc nh lut Bayes; Phng php tt nh: khng s dng cc thuc tnh thng k ca lp i tng c nghin cu nh phng php phn tch tuyn tnh, perceptrron, i tng c m t qua cc thnh phn c s v mi lin quan gia nhng thnh phn c s ; Biu din i tng bng cc xu v quy tc sinh xu Qu trnh nhn dng tr thnh bi ton phn tch c php v da vo nguyn l tng qut ha tnh cht; Vn : trch chn c nhng thnh phn c bn v xc nh c quan h gia cc thnh phn .

Phng php cu trc

Chng II. Phn nhm da trn l thuyt quyt nh Bayesng dng Bayes Theorem trong phn lp (Using Bayes Theorem in Classification)1. Gii thiu Bayes Theorem

Trong lnh vc Data Mining, Bayes Theorem (hay Bayes Rule) l k thut phn lp da vo vic tnh xc sut c iu kin. Bayes Rule c ng dng rt rng ri bi tnh d hiu v d trin khai.Bayes' Rule (CT1): Trong :

D : Data h : Hypothesis (gi thuyt) P(h) : Xc sut gi thuyt h (tri thc c c v gi thuyt h trc khi c d liu D) v gi l prior probability ca gi thuyt h. P(D| h): Xc sut c iu kin D khi bit gi thuyt h (gi l likelihood probability). P(D): xc sut ca d liu quan st D khng quan tm n bt k gi thuyt h no. (gi l prior probability ca d liu D) T s : Ch s lin quan (irrelevance index) dng o lng s lin quan gia 2 bin A v B. Nu irrelevance index =1, c ngha A v B khng lin quan nhau. P(h|D) :Xc sut c iu kin h khi bit D (gi l posterior probability ca gi thuyt h)

1. Gii thiu Bayes Theorem Trong rt nhiu ng dng, cc gi thuyt hi c th loi tr nhau v v d liu quan st D l tp con ca tp gi thuyt cho nn chng ta c th phn r P(D) nh sau (CT2): V nn (CT1) c th vit li nh sau (CT3) Thay P(D) trong (CT2) vo (CT1) ta c (CT4)

1. Gii thiu Bayes Theorem (CT4) gi l Bayess Theorem

V d sau y m t cch tnh Bayess Theorem Gi s ta c d liu quan st v 250 i tng tm hiu mi quan h gia 2 bin thu nhp (income: Low(D1), Medium(D2), High(D3)) v loi xe hi (Car: Second hand (h1), New (h2)) m h mua.

V d sau y m t cch tnh Bayess Theorem By gi gi s rng ta ch bit phn trm theo dng (Percentage by Row) v phn trm theo cc bin (Marginal Percentage hay Percentage by Total) nh sau.

Cu hi t ra l c th tnh phn trm theo ct (percentage by column) ch da vo thng tin t 2 bng trn hay khng?.

V d sau y m t cch tnh Bayess Theorem

V d sau y m t cch tnh Bayess Theorem Bng phn trm theo ct (Percentage by Column) c biu din nh sau:

S dng Bayes Rule chng ta c th d dng tnh cc phn trm theo ct. Chn hn

V d sau y m t cch tnh Bayess Theorem Tng t nh trn, ta tnh c tt c cc gi tr trong bng phn trm theo ct nh sau:

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier) Cc v d sau y minh ha vic s dng Bayes Theorem trong vic phn lp d liu. B phn lp d liu da trn Bayes theorem cn gi l Nave Bayes Classifier. V d 1: C training data v thi tit nh sau

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier) S dng Nave Bayes Classifier xc nh kh nng n chi th thao (Play = yes hay no) vi thi tit ca ngy quan st c nh sau:

T Training data ta c d liu nh sau:

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier) V thuc tnh phn lp Play ch c 2 gi tr l yes (ngha l c n chi th thao) v no(khng n chi th thao) nn ta phi tnh Pr(yes|E) v Pr(no|E) nh sau. Trong E l d liu cn phn lp (d on)

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier)

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier)

V P(no) > P(yes) nn kt qu d on Play =no

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier) V d 2: C Training Data v Unseen data nh sau

2. ng dng Bayes Theorem trong phn lp d liu (Nave Bayes Classifier) S dng Nave Bayes Classifier phn lp cho Unseen data (X) Class: C1:buys_computer =yes, C2:buys_computer =no Tnh P(X|Ci) cho mi class X=(age d(C, c2 ) = 0.22 C thuc cm 2 d(D, c1 ) = 25 > d(D, c2 ) = 3.56 D thuc cm 267K-Mean v ng dung

II.3 V D MINH HABc 4-2: Lp li bc 3-Cp nht trng tm c1 = (3/2, 1) v c2 = (9/2, 7/2)K-Mean v ng dung

68

II.3 V D MINH HABc 4-3: Lp li bc 2 d(A, c1 ) = 0.25 < d(A, c2 ) = 18.5 A thuc cm 1 d(B, c1 ) = 0.25 < d(B, c2 ) = 12.5 B thuc cm 1 d(C, c1 ) = 10.25 < d(C, c2 ) = 0.5 C thuc cm 2 d(D, c1 ) = 21.25 > d(D, c2 ) = 0.5 D thuc cm 269K-Mean v ng dung

II.3 V D MINH HAK-Mean v ng dung

70

B