!
!
!
"#!$%&'()!*+(&,!-./-!0!!
1223,'4%55(&,!1647+(4%86,!
!
!
!
/!
TP!Apprentissage!Automatique!
Date!:!!-9!:(35!-./-!
Auteur!:!:(4;%,6!<(&3('&,!
1.#Introduction#
!
=,!"#!>%5,!?!@7'5436%3,!6'!5A54B+,!5%+2),!C,!CD4,@4%7'!C,!)(!>7%E!@;('4D,!C('5!6'!F)6E!
(6C%7G! 16! F%'()H! )I,'43D,! C6! 5A54B+,! ,54! 6'! F%@;%,3! wav!@7'4,'('4! )(! 474()%4D! C6! 5%&'()!
(6C%7H! ,4! )(! 5734%,! 5,3(! 6',! @)(55%F%@(4%7'!C,! )I(6C%7! ?! C,6E! @)(55,5! J@;('4D,! 76! '7'K
@;('4D,LG!
!
#763! (33%>,3! ?! @,)(H! '765! ())7'5! @7'5436%3,! 6'! +7CB),! 2763! )(! CD4,@4%7'! C,! )(! >7%E!
@;('4D,! ?! )I(%C,! C,5! +D4;7C,5! CI(223,'4%55(&,! (647+(4%86,G! M765!(>7'5! ?! '743,!
C%5275%4%7'!6',!N(5,!C,!C7''D,5!C,!57%E('4,!F%@;%,35!C,!+65%86,!272!C,!/O!5,@7'C,5H!
4%3D5!()D(47%3,+,'4H!,4!)(ND)%5D5!2763!%'C%86,3!),!CDN64!,4!)(!F%'!C,!)(!>7%E!@;('4D,G!<,!3P),!
CI(223,'4%55(&,!(647+(4%86,!,54!C7'@!CI%'FD3,3!C,5!+7CB),5!5(4%5F(%5('4!?!2(34%3!C,!@,5!
C7''D,5!CI(223,'4%55(&,!2763!276>7%3!@)(55%F%,3!C,5!F%@;%,35!(6C%7!@7++,!CD@3%45G!
!
#763! +7CD)%5,3! )(! @7''(%55('@,! CI(223,'4%55(&,! '765! ())7'5! '765! (226A,3! 563! C,5!
+D)('&,5! C,! C%543%N64%7'5! J@7++,! @7+237+%5! ,'43,! ),5! +7CB),5! 2(3(+D43%86,5! ,4!
C,'5%4D5! '7A(6ELG! <(! )7%! C,! CD@%5%7'! 5,3(! ,'56%4,! )(! )7%! :1#H! 76! )(! >3(%5,+N)('@,! C,5!
@)(55,5!,'!(N5,'@,!C,!)I%'F73+(4%7'!?!23%73%G!
!
#763! 23D2(3,3! >743,! ,'>%37'',+,'4! C,! 43(>(%)H! 4D)D@;(3&,Q! ),! F%@;%,3! 56%>('4! ,4! ),!
CD@7+23,55,3!563!>743,!+(@;%',!0!
;4420RR@75+()G6@5CG,C6R(35;%(R1"*1:R1"*1:S"#S:<.TGQ%2!
<('@,Q! :(4)(NH! ,4! ()),Q! >,35! ),! C755%,3! 86,! >765! >,',Q! C,! CD@7+23,55,3! C('5! :(4)(NG!
1U764,Q!),!477)N7E!MV"<1W!?!>743,!,'>%37'',+,'4!:(4)(N!0!
!
>> addpath(‘netlab’)
2.#Extraction#des#descripteurs#
!
<(! 23,+%B3,! D4(2,! C,! +7CD)%5(4%7'! ,54! C,! @;7%5%3! @7++,'4! '765! ())7'5! CD@3%3,! 76!
3,23D5,'4,3!),5!57'5!J57%4!2763!)I(223,'4%55(&,!76!(6!+7+,'4!C,!)(!CD@%5%7'LG!!
!
M743,! N(5,! C,! C7''D,5! CI(223,'4%55(&,! @7'4%,'4! C,! )(! +65%86,! JC755%,3! music)* ,4!
D&(),+,'4!C,5!)(N,)5!JC755%,3!labelL!@7+2734('4!),!+X+,!'7+!86,!),!F%@;%,3!57'G!Y765!
276>,Q!@;(3&,Q!),5!F%@;%,35!57'!C('5!:(4)(N!,4!),5!D@764,3!0!
[d,sr] = wavread(fullfile('music','3.wav'));
soundsc(d,sr);
!
Z&(),+,'4H!>765!276>,Q!)%3,!),5!)(N,)5!@733,527'C('4!,'!64%)%5('4!)(!@7++('C,!textread!
C('5!:(4)(N0!
!
!
!
"#!$%&'()!*+(&,!-./-!0!!
1223,'4%55(&,!1647+(4%86,!
!
!
!
-!
[stt,dur,lab] = textread(fullfile('labels','3.lab'), '%f %f
%s','commentstyle','shell');
[stt(1:4),dur(1:4)] % regardons des données un peu
ans = 0 3.3470
3.3470 1.0540
4.4010 2.6190
7.0200 1.2860
lab(1:4)
ans =
'vox'
'mus'
'vox'
'mus'
% donc 3.wav commence par 3.35 de voix, ensuite la musique, etc.
!
#763!'743,! 4[@;,!C,!@)(55%F%@(4%7'H!'765! 'I())7'5!2(5!64%)%5,3!)(!F73+,! CI7'C,!C,5! 57'5H!
+(%5!C,5!@7,FF%@%,'45!@,2543(6EH!?!)I(%C,!C,!)(!F7'@4%7'!mfcc.m!JD@3%4!2(3!:()@7)+!$)(',ALG!
#763!),5!>7%3H!
% MFCCs on a 20ms timebase:
cc = mfcc(d,sr,1/0.020);
% How big is it?
size(cc)
ans = 13 749
% First 13 cepstra (0..12) is standard;
% Take a look at the cepstra:
figure,imagesc(cc)
axis xy
% It's hard to see much in the cepstra.
% C0 is scaled differently because it's the average.
!
\!2(34!),5!@7,FF%@%,'45!:]==H!'765!())7'5!(U764,3!),63!23,+%B3,!,4!C,6E%B+,!CD3%>D,!2763!
(U764,3!6',!C%+,'5%7'!4,+273,)),!(6E!C7''D,5!0!!
!
>> cc = [cc; deltas(cc); deltas(deltas(cc,5),5)];
>> size(cc)
ans = 39 11987
!
16!F%'()H!'765!(>7'5!N,57%'!C,!3('&,3!4765!),5!C,5@3%24,635!,4!)(N,)5!2(3!43(+,!CI('()A5,G!
#763! >765! F(@%)%4,3! )(! >%,H! ! 4764,5! ),5! C7''D,5! CI(223,'4%55(&,! 57'4! 23D2(3D,5! ,4!
C%527'%N),5!C('5!),!F%@;%,3!ftrslabs.mat*.!Y765!276>,Q!),!@;(3&,3!C('5!:(4)(N!0!
!
load ftrslabs.mat
M765!(>7'5!+(%'4,'('4!),5!C7''D,5!CI(223,'4%55(&,!23X4!C('5!)(!+(43%@,!ftrsH!(>,@!),5!
C,5@3%24,635! C('5! ),5! )%&',5H! ,4! 6',! (643,! >(3%(N),! labs!5@()(%3,! (>,@! ),5! )(N,)5!
@733,527'C('45!J2763!@;(86,!)%&',!C,!ftrs!7^!/!%'C%86,!@;('4D,LG!
!
M765!57++,5!+(%'4,'('4!23X4!?!+7CD)%5,3R(223,'C3,!'743,!@)(55%F%,63!_!
!
3.#Modèle#de#mélange#Gaussien#
!
$%!7'!5(>(%4!)(!C%543%N64%7'!C,5!C,5@3%24,635!2763!'743,!@)(55%F%@(4%7'!J@;('4D,!76!'7'K
@;('4D,LH! 7'! 27633(%4! @)(55%F%,3! C,5! '76>,(6E! (33%>D5! ,'! 64%)%5('4! ),! ratio* de*
!
!
!
"#!$%&'()!*+(&,!-./-!0!!
1223,'4%55(&,!1647+(4%86,!
!
!
!
9!
vraisemblance!C,5!C,6E!@)(55,5G!#763!@,)(H!'765!())7'5!,54%+,3!),5!#`]5!C,5!D@;('4%))7'5!
%'C%>%C6,)5!C('5!'743,! N(5,! CI(223,'4%55(&,G! #763!(>7%3! 6',! %CD,H! '765! ())7'5!CI(N73C!
,E(+%',3!),5!C7''D,5!,'!64%)%5('4!5,6),+,'4!-!C%+,'5%7'5!J2763!276>7%3!),5!>%56()%5,3LH!
+(%5! ,'! 23(4%86,! 7'! >76C3(%4! 64%)%5,3! 4764,5! ),5! C%+,'5%7'5! 2755%N),5! JC7'@! 9T!
C%+,'5%7'5!C('5!'743,!@(5LG!
!
=7+2(37'5! ),5! C,6E! 23,+%B3,5! C%+,'5%7'5! C6! @,2543,! 2763! 4764,5! ),5! C7''D,5!
CI(223,'4%55(&,!0!
!
% Sort training data into sung and unsung frames
ddS = ftrs(labs==1,:);
ddM = ftrs(labs==0,:);
% Compare scatter plots of 1st 2 dimensions
% First with sung frames (red dots) in front:
subplot(221)
plot(ddM(:,1),ddM(:,2),'.b',ddS(:,1),ddS(:,2),'.r')
% then with unsung frames (blue dots) in front:
subplot(222)
plot(ddS(:,1),ddS(:,2),'.r',ddM(:,1),ddM(:,2),'.b')
% Heavily overlapped, but some difference...
!!
:(%'4,'('4H!'765!())7'5!,54%+,3!6',!#`]!@7'4%'6,!563!@,5!C,6E!,'5,+N),5!,'!64%)%5('4!
6'!+D)('&,!C,!a(655%,'',5!?!-!C%+,'5%7'5H!(>,@!),!F(+,6E!()&73%4;+,!V:G!M765!())7'5!
64%)%5,3! ),5! F7'@4%7'5! C,! Netlab! 86%! %+2)D+,'4,'4! ),5! +7CB),5! ,4! +D4;7C,5!
CI(223,'4%55(&,!2763!'765G!
!
#763!64%)%5,3!NetlabH!>765! ()),Q!64%)%5,3!),5!F7'@4%7'5!56%>('4,5G!Y765!C,>,Q!3,&(3C,3!),!
;,)2!C,!@;(86,!F7'@4%7'!2763!>765!F(+%)%(3%5,3!J,G&G!bb;,)2!&++L!
o a++G+!0!=3D(4%7'!C6!+7CB),!C,!+D)('&,!C,!a(655%,'',5!Ja::LG!
o a++%'%4G+!0!*'%4%()%5(4%7'!C6!+7CB),!(>,@!cK:,('5!563!),5!C7''D,5G!
o a++,+G+!0!1)&73%4;+,!V:!2763!a::G!
o a++237NG+!0!=()@6),!C,!)(!237N(N%)%4D!CI6',!C7''D,!563!),!a::!(223%5G!
!
*G Z@3%>,Q!6',!F7'@4%7'!traingmms!86%!23,'C!@7++,!,'43D,!0!
o V'5,+N),!C,5!C,5@3%24,635!
o <,5!)(N,)5!@733,527'C('45!
o V4!6'!,'4%,3!%'C%86('4!),!'7+N3,!C,!a(655%,'',5!2(3!@;(86,!a::!
d6%! (223,'C! C,6E! a::5! 2763! @;(86,! @)(55,! J@;('4D,R'7'K@;('4D,L! ,'! 64%)%5('4! C,5!
F7'@4%7'5!C,!M,4)(NG!<(!F7'@4%7'!%+23%+,!)(!précision!C6!@)(55%F%,63!!,'!2763@,'4(&,!,'!
64%)%5('4!),5!+7CB),5!(223%5!,4!C,5!C7''D,5!CI(223,'4%55(&,!,)),5K+X+,5G!<(!5734%,!C,!)(!
F7'@4%7'!5,3(!),5!C,6E!+7CB),5!a::!(223%5!563!),5!C7''D,5!J5734%,!C,!&++,+L!2)65!)(!
23D@%5%7'!@()@6)D,G!<I,'4X4,!C,!>743,!F7'@4%7'!3,55,+N),3(!C7'@!?!0!
!
[gmS,!gmM,!precision]!=!traingmms!(ftrs,!labs,!nmix)!
!
#763!)(!2(34%,!(223,'4%55(&,H!>743,!F7'@4%7'!C7%4!0!
o =3D,3!C,6E!a::5!J(>,@!F7'@4%7'!gmmL!2763!@;(86,!@)(55,!
o e4%)%5,Q! ‘diag’* @7++,! 437%5%B+,! 2(3(+B43,! J:(43%@,! C,! @7>(3%('@,!
C%(&7'(),L!
o *'%4%()%5,3!@;(86,!a::!(>,@!fK:,('5!,4!),5!C7''D,5!5D2(3D,5!
o :,44,Q!),!'7+N3,!+(E%+()!CI%4D3(4%7'5!?!O!J76!options(14)=5L!
!
!
!
"#!$%&'()!*+(&,!-./-!0!!
1223,'4%55(&,!1647+(4%86,!
!
!
!
g!
o 1223,'C3,!),5!+7CB),5!(>,@!()&73%4;+,!V:!
o :,44,Q!),!'7+N3,!+(E%+()!CI%4D3(4%7'5!?!-.!J76!options(14)=20)!
!
#(3!,E,+2),H! 2763!64%)%5,3! U654,!),5! C,6E!23,+%B3,5! C%+,'5%7'5!C,5! C,5@3%24,635!2763!
(223,'C3,!C,5!a::5!?!O!a(655%,'',5!>765!C,>,Q!(33%>,3!?0!
!
[M0,M1] = traingmms(ftrs(:,[1 2]), labs, 5);
Warning: Maximum number of iterations has been exceeded
Warning: Maximum number of iterations has been exceeded
Warning: Maximum number of iterations has been exceeded
Warning: Maximum number of iterations has been exceeded
Accuracy on training data = 66.1%
Elapsed time = 36.7439 secs
!
**G V>()6,Q!)(!23D@%5%7'!C,!>743,!@)(55%F%,63H!,'!>(3%('4!0!
(G <,! '7+N3,! C,! C%+,'5%7'5! C,5! C,5@3%24,635! 64%)%5D5! 2763! 6'! '7+N3,! C,!
+D)('&,!F%ED!JOLG!J](%4,5!C,5!2(5!C,!O!0!OH!/.H!/OHhH!9TL!
NG <,! '7+N3,! C,! +D)('&,5! J>(3%('4! C,! O! ?! /.LH! 2763! C,5! C,5@3%24,635! ?! O!
C%+,'5%7'5G!JOH!/.H!/OH!-.L!
]763'%55,Q! C,6E! plot! 86%! +7'43,'4! )ID>7)64%7'! C,! )(! 23D@%5%7'! ,'! F7'@4%7'! C,! )(!
C%+,'5%7'!C,5!C7''D,5!,4!)(!@7+2),E%4D!CI(223,'4%55(&,G!
!
4.#Évaluation#
!
:,563,3!)(!2,3F73+('@,!563!)(!N(5,!C,!C7''D,5!CI(223,'4%55(&,!2,64!>765!C%3,!5%!>743,!
+7CB),! ,54! ,'! 43(%'! CI(223,'C3,! 76! 2(5H! +(%5! @,! 'I,54! 2(5! 6',! N7'',! +,563,! C,!
2,3F73+('@,! C('5! ),! +7'C,! 3D,)_! <ID>()6(4%7'! C7%4! 5,! F(%3,! '73+(),+,'4! 563! C,5!
C7''D,5!86%!'I7'4!2(5!D4D!64%)%5D,5!2763!)I(223,'4%55(&,G!M765!())7'5!C7'@!D>()6,3!'743,!
5A54B+,! 563! ),! F%@;%,3! i!C7'4SA76Sj('4S+,K;6+('S),(&6,Gj(>!k! 86%! (!D4D! )(ND)%5D!
(62(3(>('4!2763!276>7%3!4,54,3!)(!2,3F73+('@,!C,!'743,!5A54B+,G!!
!
*)!A!(!2)65%,635!F(l7'5!,4!+,563,5!2763!D>()6,3!'743,!+7CB),G!#763! @,!"#H!'765!())7'5!
237C6%3,! ),! 3D56)4(4! C,! @)(55%F%@(4%7'! 2763! @;(86,! 43(+,! CI('()A5,H! ,4! ,'56%4,! ),!
@7+2(3,3! 2(3! ),5! )(N,)5! @733,527'C('45G! <,5! 43(+,5! CI('()A5,5! (%'5%! 86,! ),5! )(N,)5!
@733,527'C('45! >%,'','4! (647+(4%86,+,'4! 2(3! ),! @;(3&,+,'4! C6! F%@;%,3! evaldata.mat!
Jcc!,4!lsamp!3,52,@4%>,+,'4LG!
!
>> load evaldata.mat % va charger: cc lsamp tt
!
!
***G V'!64%)%5('4! >743,!F7'@4%7'! traingmmsH! F(%3,!(223,'C3,! C,5! a::5!,'! 64%)%5('4! ),5!
C%+,'5%7'5!mm/0gn!m/g0/on!m-o09.nn!C,5!C7''D,5!JftrsLH!,4!563! C,5!+D)('&,5!C,!-.!
a(655%,'',5G!!
](%4,5! ,'56%4,! 6',! @)(55%F%@(4%7'! C,5! C7''D,5! CID>()6(4%7'! Jcc* –* (>,@! ),5! +X+,5!
C%+,'5%7'5!64%)%5D,5!)735!C,!)I!(223,'4%55(&,LH!@()@6),Q!)(!23D@%5%7'!,'!@7+2(3('4!),!
3D56)4(4!(>,@!C,5!)(N,)5!JlsampLG!
!
!
!
"#!$%&'()!*+(&,!-./-!0!!
1223,'4%55(&,!1647+(4%86,!
!
!
!
O!
5.#Malédiction#de#la#dimensionalité#
!
=()@6),3!,4!(FF%@;,3!)I;%547&3(++,!C,5!C%54('@,5!,'43,!/...!27%'45!CI6'!,52(@,!?!'K
C%+,'5%7'5H!2763!'!p!m-q!/.q!/..q!/...nG!
!
#763!@,)(H!%)!>765!,54!C,+('CD!CI%+2)('4,3!)(!F7'@4%7'!+A`%54J(LH!86%!?!2(34%3!CI6',!
+(43%@,!@7'4,'('4!),5!>,@4,635!C,!C,5@3%24%7'!CI6'!,'5,+N),!CI7NU,45H!@()@6),!4764,5!),5!
2(%3,5!C,!C%54('@,!(6!5,'5!C,!)(!'73+,!,6@)%,'',!J64%)%5,3!)(!F7'@4%7'!'73+LG!!
!
<,!3D56)4(4!(44,'C6!,54!6',!+(43%@,!@(33D,!?!C%(&7'(),!'6)),G!
!
16!>6!C,5!C%FFD3,'45!;%547&3(++,5H!,'!CDC6%3,!6',!@7'5D86,'@,!C%3,@4,!2763!4764,!
(22)%@(4%7'!23(4%86,!64%)%5('4!)(!'74%7'!C,!C%>,3&,'@,!,'43,!7NU,45!3,23D5,'4D5!5765!
F73+,!C,!>,@4,635!C,!@(3(@4D3%54%86,5G!
!
6.#Classification#non#paramétrique#
!
<I()&73%4;+,!C,!@)(55%F%@(4%7'!C,5!2)65!237@;,5!>7%5%'5H!@)(55%F%,!6',!7N5,3>(4%7'!(>,@!
)ID4%86,44,!)(!2)65!576>,'4!(557@%D,!(6E!'K2)65!237@;,5!>7%5%'5!C,!@,44,!7N5,3>(4%7'!(6!
5,%'!C,!)(!N(5,!CI(223,'4%55(&,G!
!
#37275,3!6'!5@;,+(!C,!@)(55%F%@(4%7'!N(5,!563!@,44,!(2237@;,!3D27'C('4!(6!237N),+,!C,!
)(!C,4,@4%7'!C,!)(!2(34%,!@;('4D,G!!
!
#763!)(!N(5,!@7'5%CD3D,!%@%H!86,)!,54!),!'!724%+()!r!
1 / 5 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !