Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

PEMROSESAN BAHASA ALAMI

Presentasi serupa


Presentasi berjudul: "PEMROSESAN BAHASA ALAMI"— Transcript presentasi:

1 PEMROSESAN BAHASA ALAMI
codebook PEMROSESAN BAHASA ALAMI

2 CodeBook Code book merupakan salah teknik untuk melakukan pengenalan berbasis jarak Tahap Data hasil ekstraksi ciri Lakukan klastering Hitung jarak setiap data uji terhadap anggota cluster (codeword) Ambil jarak minimum setiap data uji ke data latih Hitung total jarak minimum setiap kelas Bandingkan Ambil yang paling minimum

3 Example There are two class of signals : z and y
z have two training data y have two training data We are using mfcc with 5 Cepstrum Coefficient We are using kmeans and codebook with three codewords

4 Training data, after mfcc
z{1}= [ ]

5 Training data z{2}= [ ]

6 Training data y{1}= [ ]

7 Training data y{2} = [ ]

8 Testing data, another signal (z/y ?)
c = [ ]

9 mybuildmodel function [idxz, rz, idxy, ry]=mybuildmodel(z,y) allz=[];
for i=1:size(z,2) allz=[allz z{i}]; end allz=allz'; [idxz, rz]= kmeans(allz,3); rz=rz';

10 mybuildmodel (2) ally=[]; for i=1:size(y,2) ally=[ally y{i}]; end
for i=1:size(y,2) ally=[ally y{i}]; end ally=ally'; [idxy, ry]= kmeans(ally,3); ry=ry';

11 mycountdist function myclass=mycountdist(idxz, rz, idxy, ry,resultmfccnew) mydistz=0; mydisty=0; for framenya=1:size(resultmfccnew,2) min=1;

12 mycountdist (2) minjarz=dist([rz(:,1) resultmfccnew(:,framenya)]);
for j=2:3 jarz=dist([rz(:,j) resultmfccnew(:,framenya)]); if jarz<=minjarz minjarz=jarz; end mydistz=mydistz+minjarz;

13 mycountdist (3) minjary=dist([ry(:,1) resultmfccnew(:,framenya)]); for j=2:3 jary=dist([ry(:,j) resultmfccnew(:,framenya)]); if jary<=minjary minjary=jary; end mydisty=mydisty+minjary;

14 mycountdist (4) disp(‘distance to class z'); disp(mydistz); disp(' distance to class y'); disp(mydisty); if mydistz<=mydisty myclass=1; disp(‘This signal is member of class z'); else myclass=2; disp(' This signal is member of class y'); end

15 In MATLAB command window
[idxz, rz, idxy, ry]=mybuildmodel(z,y) theclass=mycountdist(idxz, rz, idxy, ry,c)


Download ppt "PEMROSESAN BAHASA ALAMI"

Presentasi serupa


Iklan oleh Google