<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">while</span>(dW > 1e-15),</div><div class="t m0 x1 h2 y2 ff1 fs0 fc1 sc0 ls0 ws0"> <span class="fc2">%Choose a sample randomly</span></div><div class="t m0 x1 h2 y3 ff1 fs0 fc1 sc0 ls0 ws0"> <span class="fc0">i = randperm(L);</span></div><div class="t m0 x1 h2 y4 ff1 fs0 fc0 sc0 ls0 ws0"> phi = train_features(:,i(1));</div><div class="t m0 x1 h2 y5 ff1 fs0 fc0 sc0 ls0 ws0"> net_k = W'*phi;</div><div class="t m0 x1 h2 y6 ff1 fs0 fc0 sc0 ls0 ws0"> y_star= find(net_k == max(net_k));</div><div class="t m0 x1 h2 y7 ff1 fs0 fc0 sc0 ls0 ws0"> y_star= y_star(1);</div><div class="t m0 x1 h2 y8 ff1 fs0 fc2 sc0 ls0 ws0"> %Just in case two have the same weights!</div><div class="t m0 x1 h2 y9 ff1 fs0 fc0 sc0 ls0 ws0"> oldW = W;</div><div class="t m0 x1 h2 ya ff1 fs0 fc0 sc0 ls0 ws0"> W = W + eta*phi*gamma(win_width*abs(net<span class="fc6 sc0">_k - y_star))';</span></div><div class="t m0 x1 h2 yb ff1 fs0 fc0 sc0 ls0 ws0"> W = W ./ (ones(D,1)*sqrt(sum(W.^2)));</div><div class="t m0 x1 h2 yc ff1 fs0 fc0 sc0 ls0 ws0"> eta = eta * deta;</div><div class="t m0 x1 h2 yd ff1 fs0 fc0 sc0 ls0 ws0"> dW = sum(sum(abs(oldW-W)));</div><div class="t m0 x1 h2 ye ff1 fs0 fc0 sc0 ls0 ws0"> iter = iter + 1; </div><div class="t m0 x2 h3 yf ff2 fs1 fc1 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y10 ff1 fs0 fc1 sc0 ls0 ws0">if<span class="fc0"> (plot_on == 1),</span></div><div class="t m0 x1 h2 y11 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc2">%Assign each of the features to a cen<span class="fc6 sc0">ter</span></span></div><div class="t m0 x1 h2 y12 ff1 fs0 fc0 sc0 ls0 ws0"> dist = W'*train_features;</div><div class="t m0 x1 h2 y13 ff1 fs0 fc0 sc0 ls0 ws0"> [m, label] = max(dist);</div><div class="t m0 x1 h2 y14 ff1 fs0 fc0 sc0 ls0 ws0"> centers = zeros(D,Nmu);</div><div class="t m0 x1 h2 y15 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc3"> <span class="fc1">for </span></span>i = 1:Nmu,</div><div class="t m0 x1 h2 y16 ff1 fs0 fc0 sc0 ls0 ws0"> in = find(label == i);</div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">if</span> ~isempty(in)</div><div class="t m0 x1 h2 y18 ff1 fs0 fc0 sc0 ls0 ws0"> centers(:,i) = mean(trai<span class="fc6 sc0">n_</span>featu<span class="fc6 sc0">res(:,find(label==i))')';</span></div><div class="t m0 x1 h2 y19 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">else</span></div><div class="t m0 x1 h2 y1a ff1 fs0 fc0 sc0 ls0 ws0"> centers(:,i) = nan;</div><div class="t m0 x1 h2 y1b ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y1c ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y1d ff1 fs0 fc0 sc0 ls0 ws0"> plot_process(centers)</div><div class="t m0 x1 h2 y1e ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y1f ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y20 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">if</span> (iter/100 == floor(i<span class="fc6 sc0">ter/100)),</span></div><div class="t m0 x1 h2 y21 ff1 fs0 fc0 sc0 ls0 ws0"> disp(['Iteration nu<span class="fc6 sc0">mber ' num2str(iter)])</span></div><div class="t m0 x1 h2 y22 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y23 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y24 ff1 fs0 fc1 sc0 ls0 ws0">end</div><div class="t m0 x1 h2 y25 ff1 fs0 fc2 sc0 ls0 ws0">%Assign a weigh<span class="fc6 sc0">t to each feature</span></div><div class="t m0 x1 h2 y26 ff1 fs0 fc0 sc0 ls0 ws0">label = zeros(1,L);</div><div class="t m0 x1 h2 y27 ff1 fs0 fc1 sc0 ls0 ws0">for <span class="fc0">i = 1:L,</span></div><div class="t m0 x1 h2 y28 ff1 fs0 fc0 sc0 ls0 ws0"> net_k = W'*train_features(:,i);</div><div class="t m0 x1 h2 y29 ff1 fs0 fc0 sc0 ls0 ws0"> label(i) = find(net_k == max(net_k));</div><div class="t m0 x1 h2 y2a ff1 fs0 fc1 sc0 ls0 ws0">end</div><div class="t m0 x1 h2 y2b ff1 fs0 fc2 sc0 ls0 ws0">%Find the target for each weight<span class="fc6 sc0"> </span>and the ne<span class="fc6 sc0">w features</span></div><div class="t m0 x1 h2 y2c ff1 fs0 fc0 sc0 ls0 ws0">targets = zeros(1,Nmu);</div><div class="t m0 x1 h2 y2d ff1 fs0 fc0 sc0 ls0 ws0">features = zeros(D, Nmu);</div><div class="t m0 x1 h2 y2e ff1 fs0 fc1 sc0 ls0 ws0">for <span class="fc0">i = 1:Nmu,</span></div><div class="t m0 x1 h2 y2f ff1 fs0 fc0 sc0 ls0 ws0"> in = find(label == i);</div><div class="t m0 x1 h2 y30 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">if</span> ~isempty(in),</div><div class="t m0 x1 h2 y31 ff1 fs0 fc0 sc0 ls0 ws0"> targets(i) = sum(train_targets(in)) <span class="fc6 sc0">/ length(in) > .5;</span></div><div class="t m0 x1 h2 y32 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">if</span> length(in) == 1,</div><div class="t m0 x1 h2 y33 ff1 fs0 fc0 sc0 ls0 ws0"> features(:,i) = train_features(:,i<span class="fc6 sc0">n);</span></div><div class="t m0 x1 h2 y34 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">else</span></div><div class="t m0 x1 h2 y35 ff1 fs0 fc0 sc0 ls0 ws0"> features(:,i) = mean(train_featur<span class="fc6 sc0">es(:,in)')';</span></div><div class="t m0 x1 h2 y36 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y37 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="fc1">end</span></div><div class="t m0 x1 h2 y38 ff1 fs0 fc1 sc0 ls0 ws0">end</div><div class="t m1 x3 h4 y39 ff3 fs2 fc4 sc0 ls0 ws0">Da<span class="_ _0"></span>vid G. Stork</div><div class="t m1 x3 h4 y3a ff3 fs2 fc4 sc0 ls0 ws1">Elad Y<span class="_ _1"></span>om-T<span class="_ _2"></span>o<span class="_ _0"></span>v</div><div class="t m1 x4 h5 y3b ff4 fs3 fc5 sc0 ls0 ws0">Computer Manual</div><div class="t m1 x5 h5 y3c ff4 fs3 fc5 sc0 ls0 ws0">in MA<span class="_ _3"></span>TLAB</div><div class="t m1 x6 h5 y3d ff4 fs3 fc5 sc0 ls0 ws0">to accompany</div><div class="t m1 x7 h6 y3e ff3 fs4 fc5 sc0 ls0 ws0">P<span class="_ _0"></span>attern</div><div class="t m1 x7 h6 y3f ff3 fs4 fc5 sc0 ls0 ws0">Classif<span class="_ _4"></span>ication</div><div class="t m2 x8 h7 y40 ff3 fs5 fc5 sc0 ls0 ws0"> </div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,-64.000000,-128.000000]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/bg2.jpg"><div class="t m3 x9 h8 y41 ff5 fs6 fc7 sc0 ls1 ws2">Appendix to the </div><div class="t m3 xa h8 y42 ff5 fs6 fc7 sc0 ls1 ws3">Computer Manual in MA<span class="_ _3"></span>TLAB </div><div class="t m3 xb h8 y43 ff5 fs6 fc7 sc0 ls1 ws4">to accompany </div><div class="t m3 xa h8 y44 ff5 fs6 fc7 sc0 ls1 ws5">Pattern Classification (2nd ed.)</div><div class="t m3 x2 h9 y45 ff6 fs7 fc7 sc0 ls2 ws6">David G<span class="_ _3"></span>. S<span class="_ _0"></span>tork and Elad Y<span class="_ _4"></span>om-T<span class="_ _4"></span>ov</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,-64.000000,-128.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/bg3.jpg"><div class="t m3 xc ha y46 ff7 fs8 fc7 sc0 ls3 ws7">By using the Classification tool<span class="ls4 ws8">box you agree to the following </span></div><div class="t m3 xc ha y47 ff7 fs8 fc7 sc0 ls3 ws9">licensing terms:</div><div class="t m3 x5 hb y48 ff8 fs9 fc7 sc0 ls5 wsa">NO W<span class="_ _3"></span>ARRANTY</div><div class="t m3 x5 hb y49 ff8 fs9 fc7 sc0 ls6 wsb">THERE IS NO W<span class="_ _3"></span>ARRANTY FOR THE PROGRAMS, T<span class="_ _0"></span>O </div><div class="t m3 xc hb y4a ff8 fs9 fc7 sc0 ls7 wsc">THE EXTENT PERMITTED BY APPLICABLE LA<span class="_ _3"></span>W<span class="_ _3"></span>. EXCEP<span class="_ _0"></span>T<span class="_ _5"></span> </div><div class="t m3 xc hb y4b ff8 fs9 fc7 sc0 ls8 wsd">WHEN OTHER<span class="_ _0"></span>WISE ST<span class="_ _4"></span>A<span class="_ _4"></span>TED IN THE WRITING THE </div><div class="t m3 xc hb y4c ff8 fs9 fc7 sc0 ls9 wse">COPYRIGHT HOLDERS AND/OR OTHE<span class="_ _5"></span>R P<span class="_ _4"></span>AR<span class="_ _0"></span>TIES PROVIDE </div><div class="t m3 xc hb y4d ff8 fs9 fc7 sc0 lsa wsf">THE PROGRAMS “AS IS” WITHOUT W<span class="_ _3"></span>ARRANTY OF ANY </div><div class="t m3 xc hb y4e ff8 fs9 fc7 sc0 lsa wsf">KIND, EITHER EXPRESSED OR <span class="lsb ws10">IMPLIED, INCLUDING<span class="_ _3"></span>, BUT </span></div><div class="t m3 xc hb y4f ff8 fs9 fc7 sc0 lsa wsf">NOT LIMITED TO, THE IMPLIED W<span class="_ _6"></span>ARRANTIES OF </div><div class="t m3 xc hb y50 ff8 fs9 fc7 sc0 ls5 wsa">MERCHANT<span class="_ _4"></span>ABILITY AND FITNESS FOR A P<span class="_ _4"></span>AR<span class="_ _0"></span>TICULAR </div><div class="t m3 xc hb y51 ff8 fs9 fc7 sc0 lsc ws11">PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND </div><div class="t m3 xc hb y52 ff8 fs9 fc7 sc0 lsc ws11">PERFORMANCE OF THE PROGRAMS ARE WITH YOU. </div><div class="t m3 xc hb y53 ff8 fs9 fc7 sc0 lsd ws12">SHOULD THE PROGRAMS PROV<span class="_ _0"></span><span class="ls0 ws13">E DEFECTIVE, YOU ASSUME </span></div><div class="t m3 xc hb y54 ff8 fs9 fc7 sc0 lsa wsf">THECOST OF ALL NECESSAR<span class="_ _0"></span>Y SER<span class="_ _0"></span>VICING<span class="_ _3"></span>, REP<span class="_ _4"></span>AIR OR </div><div class="t m3 xc hb y55 ff8 fs9 fc7 sc0 lse ws0">CORRECTION.</div><div class="t m3 x5 hb y56 ff8 fs9 fc7 sc0 ls7 ws14">IN NO EVENT UNLESS REQUIR<span class="lsf ws15">ED BY APPLICABLE LA<span class="_ _6"></span>W </span></div><div class="t m3 xc hb y57 ff8 fs9 fc7 sc0 lsc ws11">OR AGREED TO IN WRITING WILL ANY COPYRIGHT </div><div class="t m3 xc hb y58 ff8 fs9 fc7 sc0 ls8 ws16">HOLDER, OR ANY OTHER P<span class="_ _4"></span>AR<span class="_ _0"></span>T<span class="lsa ws17">Y WHO MA<span class="_ _3"></span>Y MODIFY AND/OR </span></div><div class="t m3 xc hb y59 ff8 fs9 fc7 sc0 ls10 ws18">REDISTRIBUTE THE PROGRAMS, BE LIABLE TO YOU FOR </div><div class="t m3 xc hb y5a ff8 fs9 fc7 sc0 ls11 ws19">DAMAGES, INCLUDING ANY GENERAL, SPECIAL<span class="_ _5"></span>, </div><div class="t m3 xc hb y5b ff8 fs9 fc7 sc0 ls8 ws1a">INCIDENT<span class="_ _4"></span>AL OR CONSEQUENTIAL DAMAGES ARISING OUT </div><div class="t m3 xc hb y5c ff8 fs9 fc7 sc0 lsc ws11">OF THEUSE OR INABILIT<span class="ls11 ws19">Y TO USE THE PROGRAM </span></div><div class="t m3 xc hb y5d ff8 fs9 fc7 sc0 ls7 wsc">(INCLUDING BUT NOT LIMITED TO LOSS OF DA<span class="_ _4"></span>T<span class="_ _3"></span>A OR DA<span class="_ _4"></span>T<span class="_ _4"></span>A </div><div class="t m3 xc hb y5e ff8 fs9 fc7 sc0 ls7 wsc">BEING RENDERED INACCURA<span class="_ _4"></span>TE OR LOSSES SUST<span class="_ _4"></span>AINED BY </div><div class="t m3 xc hb y5f ff8 fs9 fc7 sc0 lsf ws13">YOU OR THIRD P<span class="_ _4"></span>AR<span class="_ _0"></span>TIES OR <span class="ls11 ws19">A F<span class="_ _4"></span>AILURE OF THE PROGRAM </span></div><div class="t m3 xc hb y60 ff8 fs9 fc7 sc0 ls11 ws1b">TO OPERA<span class="_ _3"></span>T<span class="_ _5"></span>E WITH ANY OTHER <span class="lsa wsf">PROGRAMS), EVEN IF SUCH </span></div><div class="t m3 xc hb y61 ff8 fs9 fc7 sc0 ls12 wsc">HOLDER OR OTHER P<span class="_ _4"></span>AR<span class="_ _0"></span>TY HAS BEEN ADVISED OF<span class="_ _5"></span> THE </div><div class="t m3 xc hb y62 ff8 fs9 fc7 sc0 ls7 wsc">POSSIBILITY OF SUCH DAMAGES.</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,-64.000000,-128.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/bg4.jpg"></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,-64.000000,-128.000000]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627d43579b6e2b6d551fec86/bg5.jpg"><div class="t m3 xd hb y63 ff8 fs9 fc7 sc0 ls0 ws0"> 5</div><div class="t m3 xe ha y64 ff5 fs8 fc7 sc0 ls13 ws0">Pr<span class="_ _0"></span>eface<span class="_ _7"> </span><span class="ff7 ls14"> 7</span></div><div class="t m3 xf ha y65 ff5 fs8 fc7 sc0 ls15 ws1c">APPENDIX<span class="_ _8"> </span>Pr<span class="_ _0"></span>ogram descriptions<span class="_ _9"> </span><span class="ff7 ls14 ws0"> 9</span></div><div class="t m3 xe hc y66 ff9 fsa fc7 sc0 ls16 ws1d">Chapter 2<span class="_ _a"> </span><span class="ff8 ls0 ws0">10</span></div><div class="t m3 xe hc y67 ff9 fsa fc7 sc0 ls16 ws1d">Chapter 3<span class="_ _a"> </span><span class="ff8 ls0 ws0">19</span></div><div class="t m3 xe hc y68 ff9 fsa fc7 sc0 ls16 ws1d">Chapter 4<span class="_ _a"> </span><span class="ff8 ls0 ws0">33</span></div><div class="t m3 xe hc y69 ff9 fsa fc7 sc0 ls16 ws1d">Chapter 5<span class="_ _a"> </span><span class="ff8 ls0 ws0">40</span></div><div class="t m3 xe hc y6a ff9 fsa fc7 sc0 ls16 ws1d">Chapter 6<span class="_ _a"> </span><span class="ff8 ls0 ws0">67</span></div><div class="t m3 xe hc y6b ff9 fsa fc7 sc0 ls16 ws1d">Chapter 7<span class="_ _a"> </span><span class="ff8 ls0 ws0">84</span></div><div class="t m3 xe hc y6c ff9 fsa fc7 sc0 ls16 ws1d">Chapter 8<span class="_ _a"> </span><span class="ff8 ls0 ws0">93</span></div><div class="t m3 xe hc y6d ff9 fsa fc7 sc0 ls16 ws1d">Chapter 9<span class="_ _b"> </span><span class="ff8 ls17 ws0">104</span></div><div class="t m3 xe hc y6e ff9 fsa fc7 sc0 ls18 ws1e">Chapter 10<span class="_ _c"> </span><span class="ff8 ls19 ws0">11<span class="_ _5"></span>2</span></div><div class="t m3 xe ha y6f ff5 fs8 fc7 sc0 ls1a ws0">Refer<span class="_ _0"></span>ences<span class="_ _d"> </span><span class="ff7 ls1b ws1f"> 145</span></div><div class="t m3 xe ha y70 ff5 fs8 fc7 sc0 ls0 ws0">Index<span class="_ _e"> </span><span class="ff7 ls1b ws1f"> 147</span></div><div class="t m3 x10 hd y71 ff5 fsb fc7 sc0 ls1c ws0">Contents</div><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m4"></div></a></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,-64.000000,-128.000000]}'></div></div>