ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>在线免费av网址,国产最新视频在线观看,国产视频在线看http://www.aygfsteel.com/changedi/category/43518.html先知cd——热çˆÞq”Ÿ‹zÀL˜¯ä¸€åˆ‡è‰ºæœ¯çš„å¼€å§?/description>zh-cnWed, 24 Oct 2012 10:20:18 GMTWed, 24 Oct 2012 10:20:18 GMT60èšç±»½Ž—法学习½W”è®°åQˆäº”åQ‰â€”—划分蚾c?/title><link>http://www.aygfsteel.com/changedi/archive/2010/05/11/320631.html</link><dc:creator>changedi</dc:creator><author>changedi</author><pubDate>Tue, 11 May 2010 13:07:00 GMT</pubDate><guid>http://www.aygfsteel.com/changedi/archive/2010/05/11/320631.html</guid><wfw:comment>http://www.aygfsteel.com/changedi/comments/320631.html</wfw:comment><comments>http://www.aygfsteel.com/changedi/archive/2010/05/11/320631.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.aygfsteel.com/changedi/comments/commentRss/320631.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/changedi/services/trackbacks/320631.html</trackback:ping><description><![CDATA[  <h1 style="text-indent: -18pt; margin-left: 18pt">1.<span style="font: 7pt 'Times New Roman'">     </span><span style="font-family: 宋体">划分èšç±»</span></h1> <p style="text-indent: 21pt" class="MsoNormal"><span style="font-family: 宋体">其实从柿U角度讲åQŒåˆ’分蚾cÀL˜¯å®Œå…¨ä¸ç”¨èµ˜è¿°çš„一¿Uèš¾cÀL–¹æ³•,å¯èƒ½ä¹Ÿæ˜¯æœ€å¸¸è§çš„èš¾cÈ®—法了。著åçš„</span>k-means<span style="font-family: 宋体">½Ž—法ž®±æ˜¯ä¸ªä¸­å…¸åž‹ã€‚è¿™‹Æ¡çš„å†…å®¹ä¸»è¦æ˜¯é€šè¿‡</span>k-means<span style="font-family: 宋体">èšç±»½Ž—æ³•æ¥æ€ÖM½“介ç»ä¸€ä¸‹åˆ’分蚾c…R€?/span></p> <p style="text-indent: 21pt" class="MsoNormal"><span style="font-family: 宋体">½Ž€å•æ¥è®ÔŒ¼Œ</span>k<span style="font-family: 宋体">å‡å€ÆDš¾cÈ©¶ç«Ÿåšäº†ä»€ä¹ˆäº‹åQŒæˆ‘们å¯ä»¥è¿™æ äh¥çœ‹ï¼Œæœ?/span>N<span style="font-family: 宋体">个数æ®ç‚¹çš„集å?/span>D={x1,x2,…,xn}<span style="font-family: 宋体">åQŒæ¯ä¸?/span>xi<span style="font-family: 宋体">代表一个特å¾å‘é‡ï¼Œç›®æ ‡æ˜¯å°†˜q?/span>N<span style="font-family: 宋体">个点æ ÒŽ®æŸç§ç›æ€¼¼å‡†åˆ™ž®†å…¶åˆ’分åˆ?/span>K<span style="font-family: 宋体">个分¾cÖM¸­ã€‚è€?/span>k<span style="font-family: 宋体">å‡å€¼æ‰€è¡¨è¾¾çš„é‡è¦åœ¨äºŽç›¸ä¼¼å‡†åˆ™çš„选å–åQŒå³ä¸æ–­çš„ä‹É用类½‡çš„å‡å€¼æ¥å®Œæˆ˜q™æ ·çš„划分。当然也有书把这¿Uç›¸ä¼¼å‡†åˆ™ç§°ä¹‹äØ“è¯„åˆ†å‡½æ•°ã€‚åŸºäºŽåˆ’åˆ†çš„èšç±»½Ž—法对于</span>homogeneity<span style="font-family: 宋体">的实现是通过选å–é€‚å½“çš„è¯„åˆ†å‡½æ•°åÆˆä½¿æ¯ä¸€ä¸ªæ•°æ®ç‚¹åˆ°å®ƒæ‰€å±žçš„èšç±»ä¸­å¿ƒçš„è·¼›ÀLœ€ž®åŒ–。而关键就是如何定义这¿Uè·¼›»ï¼Œå’Œæ‰€è°“çš„èšç±»ä¸­å¿ƒã€‚ä‹Dä¸ªä¾‹å­æ¥è®ÔŒ¼Œå¦‚果定义èšç±»é—´è·¼›ÖMØ“‹Æ§å¼è·ç¦»åQŒé‚£ä¹ˆå¯ä»¥ä‹Éç”¨åæ–¹å·®çš„æ¦‚忉|¥å®šä¹‰é€šç”¨çš„评分函数。划分蚾cÈš„æ€æƒ³æ˜¯æœ€ç›´è§‚å’Œæ˜“æ‡‚çš„åˆ†ç±»æ€æƒ³åQŒå› æ­¤æˆ‘也ä¸åœ¨è¿™é‡Œé•¿½‹‡ä»‹¾l,˜q˜æ˜¯ä»¥ç®—æ³•çš„å®žçŽ°å’Œä»£ç æ¥ç›´è§‚表现划分èšç±»çš„æ€§èƒ½ã€?/span></p> <h1>2. <span style="font-family: 宋体">½Ž—法实现</span></h1> <p>       <span style="font-family: 宋体">我们ä»?/span>k-means<span style="font-family: 宋体">½Ž—法ä¸ÞZ¾‹æ¥å®žçŽ°åˆ’åˆ†èš¾c…R€‚该½Ž—æ³•çš„å¤æ‚度ä¸?/span>O(KnI)<span style="font-family: 宋体">åQŒå…¶ä¸?/span>I<span style="font-family: 宋体">是è„P代次数。这¿U算法的一个å˜ä½“æ˜¯ä¾æ¬¡åˆ†æžæ¯ä¸ªæ•°æ®ç‚¹ï¼Œè€Œä¸”一旦有数æ®ç‚¹è¢«é‡æ–°åˆ†é…ž®±æ›´æ–°èš¾cÖM¸­å¿ƒï¼Œåå¤çš„在数æ®ç‚¹ä¸­å¾ªçŽ¯ç›´åˆ°è§£ä¸å†å˜åŒ–ã€?/span>k-means<span style="font-family: 宋体">½Ž—法的æœç´¢è¿‡½E‹å±€é™äºŽå…¨éƒ¨å¯èƒ½çš„划分空间的一个很ž®çš„部分。因此有å¯èƒ½å› äØ“½Ž—法收敛到评分函数的局部而éžå…¨å±€æœ€ž®è€Œé”™˜q‡æ›´å¥½çš„解。当然缓解方法å¯ä»¥é€šè¿‡é€‰å–éšæœºèµ·å§‹ç‚ÒŽ¥æ”¹è¿›æœçƒ¦åQˆæˆ‘们例å­ä¸­çš?/span>KMPP<span style="font-family: 宋体">½Ž—法åQ‰ï¼Œæˆ–者利用模拟退ç«ç­‰½{–ç•¥æ¥æ”¹å–„æœç´¢æ€§èƒ½ã€‚因此,从这个角度æ¥ç†è§£åQŒèš¾cÕdˆ†æžå®žè´¨ä¸Šæ˜¯ä¸€ä¸ªåœ¨åºžå¤§çš„è§£½Iºé—´ä¸­ä¼˜åŒ–特定评分函数的æœçƒ¦é—®é¢˜ã€?/span></p> <p style="text-indent: 21pt" class="MsoNormal"><span style="font-family: 宋体">ä¸å¤šè¯´äº†åQŒç›´æŽ¥ä¸Šä»£ç å§ï¼åQï¼</span></p> <p>k-means<span style="font-family: 宋体">½Ž—法åQ?/span></p> <p>for k = 1, … , K <span style="font-family: 宋体">ä»?/span> r(k) <span style="font-family: 宋体">ä¸ÞZ»Ž</span>D<span style="font-family: 宋体">ä¸­éšæœºé€‰å–的一个点åQ?/span></p> <p>while <span style="font-family: 宋体">在蚾c?/span>Ck<span style="font-family: 宋体">中有å˜åŒ–å‘生</span> do</p> <p>       <span style="font-family: 宋体">å½¢æˆèšç±»åQ?/span></p> <p>       For k = 1, … , K do</p> <p>              Ck = { x <span style="font-family: 宋体">∈</span> D | d(rk,x) <= d(rj,x) <span style="font-family: 宋体">å¯Òމ€æœ?/span>j=1, … , K, j != k}<span style="font-family: 宋体">åQ?/span></p> <p>       End;</p> <p>       <span style="font-family: 宋体">计算新蚾cÖM¸­å¿ƒï¼š</span></p> <p>       For k = 1, … , K do</p> <p>              Rk = Ck <span style="font-family: 宋体">内点的å‡å€¼å‘é‡?/span></p> <p>       End;</p> <p>End;</p> <p style="text-indent: 21pt" class="MsoNormal"><span style="font-family: 宋体">å…·ä½“å®žçŽ°éƒ¨åˆ†å› äØ“æœ?/span>Apache Commons Math<span style="font-family: 宋体">的现æˆä»£ç ï¼Œ¿U‰ç€</span>Eric Raymond<span style="font-family: 宋体">çš?/span>TAOUP<span style="font-family: 宋体">中的æžå¤§åˆ©ç”¨å·¥å…·åŽŸåˆ™åQŒæˆ‘没有å†?/span>k-means<span style="font-family: 宋体">的实玎ͼŒè€Œæ˜¯ç›´æŽ¥åˆ©ç”¨</span>Apache Commons Math<span style="font-family: 宋体">中的</span>k-means plus plus<span style="font-family: 宋体">ä»£ç æ¥ä½œä¸ÞZ¾‹å­ã€?/span></p> <p><span style="font-family: 宋体">具体如何‹¹‹è¯•˜q™ä¸€½Ž—法åQŒç»™å‡ÞZº†‹¹‹è¯•代ç å¦‚下åQ?br /> </p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080"> 1</span><img id="Codehighlighter1_34_719_Open_Image" onclick="this.style.display='none'; Codehighlighter1_34_719_Open_Text.style.display='none'; Codehighlighter1_34_719_Closed_Image.style.display='inline'; Codehighlighter1_34_719_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_34_719_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_34_719_Closed_Text.style.display='none'; Codehighlighter1_34_719_Open_Image.style.display='inline'; Codehighlighter1_34_719_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" /><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> testKMeansPP()</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_34_719_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_34_719_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #008000">//</span><span style="color: #008000">ori is sample as n instances with m features, here n=8,m=2</span><span style="color: #008000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img id="Codehighlighter1_128_176_Open_Image" onclick="this.style.display='none'; Codehighlighter1_128_176_Open_Text.style.display='none'; Codehighlighter1_128_176_Closed_Image.style.display='inline'; Codehighlighter1_128_176_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_128_176_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_128_176_Closed_Text.style.display='none'; Codehighlighter1_128_176_Open_Image.style.display='inline'; Codehighlighter1_128_176_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" />       </span><span style="color: #0000ff">int</span><span style="color: #000000"> ori[][] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_128_176_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_128_176_Open_Text"><span style="color: #000000">{</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_129_133_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_129_133_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">2</span><span style="color: #000000">,</span><span style="color: #000000">5</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_135_139_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_135_139_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">6</span><span style="color: #000000">,</span><span style="color: #000000">4</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_141_145_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_141_145_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">5</span><span style="color: #000000">,</span><span style="color: #000000">3</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_147_151_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_147_151_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">2</span><span style="color: #000000">,</span><span style="color: #000000">2</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_153_157_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_153_157_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">1</span><span style="color: #000000">,</span><span style="color: #000000">4</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_159_163_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_159_163_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">5</span><span style="color: #000000">,</span><span style="color: #000000">2</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_165_169_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_165_169_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">3</span><span style="color: #000000">,</span><span style="color: #000000">3</span><span style="color: #000000">}</span></span><span style="color: #000000">,</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_171_175_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_171_175_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">2</span><span style="color: #000000">,</span><span style="color: #000000">3</span><span style="color: #000000">}</span></span><span style="color: #000000">}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       </span><span style="color: #0000ff">int</span><span style="color: #000000"> n </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">8</span><span style="color: #000000">;<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       Collection</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000"> col </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> ArrayList</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000">();<br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img id="Codehighlighter1_314_422_Open_Image" onclick="this.style.display='none'; Codehighlighter1_314_422_Open_Text.style.display='none'; Codehighlighter1_314_422_Closed_Image.style.display='inline'; Codehighlighter1_314_422_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_314_422_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_314_422_Closed_Text.style.display='none'; Codehighlighter1_314_422_Open_Image.style.display='inline'; Codehighlighter1_314_422_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" />       </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> i</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000">;i</span><span style="color: #000000"><</span><span style="color: #000000">n;i</span><span style="color: #000000">++</span><span style="color: #000000">)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_314_422_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_314_422_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           EuclideanIntegerPoint ec </span><span style="color: #000000">=</span><span style="color: #000000"> new EuclideanIntegerPoint(ori[i]);<br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           col.add(ec);<br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />       }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       KMeansPlusPlusClusterer</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000"> km </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> KMeansPlusPlusClusterer</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000">(</span><span style="color: #0000ff">new</span><span style="color: #000000"> Random(n));<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       List</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">>></span><span style="color: #000000"> list </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> ArrayList</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">>></span><span style="color: #000000">();<br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       list </span><span style="color: #000000">=</span><span style="color: #000000"> km.cluster(col, </span><span style="color: #000000">3</span><span style="color: #000000">, </span><span style="color: #000000">100</span><span style="color: #000000">);<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       output(list);<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img id="Codehighlighter1_791_1344_Open_Image" onclick="this.style.display='none'; Codehighlighter1_791_1344_Open_Text.style.display='none'; Codehighlighter1_791_1344_Closed_Image.style.display='inline'; Codehighlighter1_791_1344_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_791_1344_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_791_1344_Closed_Text.style.display='none'; Codehighlighter1_791_1344_Open_Image.style.display='inline'; Codehighlighter1_791_1344_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" /></span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> output(List</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">>></span><span style="color: #000000"> list)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_791_1344_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_791_1344_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       </span><span style="color: #0000ff">int</span><span style="color: #000000"> ind </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">33</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       Iterator</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">>></span><span style="color: #000000"> it </span><span style="color: #000000">=</span><span style="color: #000000"> list.iterator();<br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img id="Codehighlighter1_912_1337_Open_Image" onclick="this.style.display='none'; Codehighlighter1_912_1337_Open_Text.style.display='none'; Codehighlighter1_912_1337_Closed_Image.style.display='inline'; Codehighlighter1_912_1337_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_912_1337_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_912_1337_Closed_Text.style.display='none'; Codehighlighter1_912_1337_Open_Image.style.display='inline'; Codehighlighter1_912_1337_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" />       </span><span style="color: #0000ff">while</span><span style="color: #000000">(it.hasNext())</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_912_1337_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_912_1337_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           Cluster</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000"> cl </span><span style="color: #000000">=</span><span style="color: #000000"> it.next();<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           System.out.print(</span><span style="color: #000000">"</span><span style="color: #000000">Cluster</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">(ind</span><span style="color: #000000">++</span><span style="color: #000000">)</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000"> :</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           List</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000"> li </span><span style="color: #000000">=</span><span style="color: #000000"> cl.getPoints();<br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           Iterator</span><span style="color: #000000"><</span><span style="color: #000000">EuclideanIntegerPoint</span><span style="color: #000000">></span><span style="color: #000000"> ii </span><span style="color: #000000">=</span><span style="color: #000000"> li.iterator();<br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">45</span><span style="color: #000000"><img id="Codehighlighter1_1183_1293_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1183_1293_Open_Text.style.display='none'; Codehighlighter1_1183_1293_Closed_Image.style.display='inline'; Codehighlighter1_1183_1293_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_1183_1293_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1183_1293_Closed_Text.style.display='none'; Codehighlighter1_1183_1293_Open_Image.style.display='inline'; Codehighlighter1_1183_1293_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" />           </span><span style="color: #0000ff">while</span><span style="color: #000000">(ii.hasNext())</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1183_1293_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1183_1293_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">46</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />              EuclideanIntegerPoint eip </span><span style="color: #000000">=</span><span style="color: #000000"> ii.next();<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />              System.out.print(eip</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />           }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />           System.out.println();<br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />       }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img id="Codehighlighter1_1351_1379_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1351_1379_Open_Text.style.display='none'; Codehighlighter1_1351_1379_Closed_Image.style.display='inline'; Codehighlighter1_1351_1379_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_1351_1379_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1351_1379_Closed_Text.style.display='none'; Codehighlighter1_1351_1379_Open_Image.style.display='inline'; Codehighlighter1_1351_1379_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" />    </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1351_1379_Closed_Text">/** */</span><span id="Codehighlighter1_1351_1379_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">60</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">61</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />    *</span><span style="color: #808080">@param</span><span style="color: #008000"> args<br /> </span><span style="color: #008080">62</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">63</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />    </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">64</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">65</span><span style="color: #000000"><img id="Codehighlighter1_1425_1537_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1425_1537_Open_Text.style.display='none'; Codehighlighter1_1425_1537_Closed_Image.style.display='inline'; Codehighlighter1_1425_1537_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_1425_1537_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1425_1537_Closed_Text.style.display='none'; Codehighlighter1_1425_1537_Open_Image.style.display='inline'; Codehighlighter1_1425_1537_Open_Text.style.display='inline';" alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String[] args) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1425_1537_Closed_Text"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1425_1537_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">66</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">67</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       </span><span style="color: #008000">//</span><span style="color: #008000">testHierachicalCluster();</span><span style="color: #008000"><br /> </span><span style="color: #008080">68</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000"><br /> </span><span style="color: #008080">69</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       testKMeansPP();<br /> </span><span style="color: #008080">70</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">71</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       </span><span style="color: #008000">//</span><span style="color: #008000">testBSAS();<br /> </span><span style="color: #008080">72</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /><br /> </span><span style="color: #008080">73</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" />       </span><span style="color: #008000">//</span><span style="color: #008000">testMBSAS();</span><span style="color: #008000"><br /> </span><span style="color: #008080">74</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000"><br /> </span><span style="color: #008080">75</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">76</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">77</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /></span></div> <p><br /> </span></p> <h1>3. <span style="font-family: 宋体">ž®ç»“</span></h1> <p>       <span style="font-family: 宋体">划分èšç±»æ˜¯èš¾cÕdˆ†æžä¸­æœ€å¸¸ç”¨çš„一¿Uèš¾cÈ®—法了åQŒå¯¹äºŽå…¶ç ”究的论文也是多如牛毛。感兴趣的朋å‹ä»¬å®Œå…¨å¯ä»¥é€šè¿‡é˜…读å„ç§ç›¸å…³è®ºæ–‡æ¥æ„Ÿå—这一½Ž—法的美妙。当然还è¦å†‹Æ¡æ„Ÿè°?/span>Apache Commons Math<span style="font-family: 宋体">对于诸多常用数学计算的实现。对于蚾cÕdˆ†æžçš„æ€È»“学习暂时到此告一ŒDµè½åQŒæœ€˜q‘è¦å¿™ç€å†™è®ºæ–‡ï¼Œ½{‰è¿‡ŒD‰|—¶é—´æœ‰½Iºå¯ä»¥è€ƒè™‘¾l§ç®‹èšç±»½Ž—法的研½I¶å­¦ä¹ ã€?/span></p> <h1>4. <span style="font-family: 宋体">å‚è€ƒæ–‡çŒ®åŠæŽ¨è阅读</span></h1> <p>[1]PatternRecognitionThird Edition, Sergios Theodoridis, Konstantinos Koutroumbas</p> <p>[2]<span style="font-family: 宋体">模å¼è¯†åˆ«½W¬ä¸‰ç‰?/span>, Sergios Theodoridis, Konstantinos Koutroumbas<span style="font-family: 宋体">è‘?/span>, <span style="font-family: 宋体">æŽæ™¶çš?/span>, <span style="font-family: 宋体">王爱ä¾?/span>, <span style="font-family: 宋体">张广æºç­‰è¯?/span></p> <p>[3]<span style="font-family: 宋体">æ•°æ®æŒ–掘原ç†</span>, David Hand and et al, <span style="font-family: 宋体">张银奎等è¯?/span></p> <p>[4]http://commons.apache.org/math/</p> <img src ="http://www.aygfsteel.com/changedi/aggbug/320631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/changedi/" target="_blank">changedi</a> 2010-05-11 21:07 <a href="http://www.aygfsteel.com/changedi/archive/2010/05/11/320631.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>èšç±»½Ž—法学习½W”è®°åQˆå››åQ‰â€”—层‹Æ¡èš¾c?/title><link>http://www.aygfsteel.com/changedi/archive/2010/03/19/315963.html</link><dc:creator>changedi</dc:creator><author>changedi</author><pubDate>Fri, 19 Mar 2010 12:08:00 GMT</pubDate><guid>http://www.aygfsteel.com/changedi/archive/2010/03/19/315963.html</guid><wfw:comment>http://www.aygfsteel.com/changedi/comments/315963.html</wfw:comment><comments>http://www.aygfsteel.com/changedi/archive/2010/03/19/315963.html#Feedback</comments><slash:comments>15</slash:comments><wfw:commentRss>http://www.aygfsteel.com/changedi/comments/commentRss/315963.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/changedi/services/trackbacks/315963.html</trackback:ping><description><![CDATA[     摘è¦:   1.    层次èšç±» 层次èšç±»½Ž—æ³•ä¸Žä¹‹å‰æ‰€è®²çš„™åºåºèšç±»æœ‰å¾ˆå¤§ä¸åŒï¼Œå®ƒä¸å†äñ”生å•一èšç±»åQŒè€Œæ˜¯äº§ç”Ÿä¸€ä¸ªèš¾cÕd±‚‹Æ¡ã€‚说白了ž®±æ˜¯ä¸€‹‚µå±‚‹Æ¡æ ‘。介¾l层‹Æ¡èš¾cÖM¹‹å‰ï¼Œè¦å…ˆä»‹ç»ä¸€ä¸ªæ¦‚å¿?#8212;—嵌套èšç±»ã€‚讲的简å•点åQŒèš¾cÈš„嵌套与程åºçš„åµŒå¥—ä¸€æ øP¼Œä¸€ä¸ªèš¾cÖM¸­R1包å«äº†å¦ä¸€ä¸ªR2åQŒé‚£˜q™å°±æ˜¯R2嵌套在R1中,或者说是R1嵌套了R2。具体说怎么½Ž—嵌套呢åQŸèš¾c»R1...  <a href='http://www.aygfsteel.com/changedi/archive/2010/03/19/315963.html'>阅读全文</a><img src ="http://www.aygfsteel.com/changedi/aggbug/315963.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/changedi/" target="_blank">changedi</a> 2010-03-19 20:08 <a href="http://www.aygfsteel.com/changedi/archive/2010/03/19/315963.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>èšç±»½Ž—法学习½W”è®°åQˆä¸‰åQ‰â€”—顺åºèš¾c?/title><link>http://www.aygfsteel.com/changedi/archive/2010/03/06/314698.html</link><dc:creator>changedi</dc:creator><author>changedi</author><pubDate>Sat, 06 Mar 2010 07:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/changedi/archive/2010/03/06/314698.html</guid><wfw:comment>http://www.aygfsteel.com/changedi/comments/314698.html</wfw:comment><comments>http://www.aygfsteel.com/changedi/archive/2010/03/06/314698.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.aygfsteel.com/changedi/comments/commentRss/314698.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/changedi/services/trackbacks/314698.html</trackback:ping><description><![CDATA[<p>   </p> <h1 style="margin-left: 18pt; text-indent: -18pt">1.<span style="font: 7pt 'Times New Roman'">    </span><span style="font-family: 宋体">™åºåºèšç±»</span></h1> <p style="text-indent: 21pt"><span style="font-family: 宋体">事实上,ž®?/span>n<span style="font-family: 宋体">个对象,èšç±»åˆ?/span>k<span style="font-family: 宋体">个蚾cÖM¸­˜q™äšg事本íw«æ˜¯ä¸€ä¸?/span>NP<span style="font-family: 宋体">éšùN—®é¢˜ã€‚ç†Ÿæ‚‰ç»„åˆæ•°å­¦åº”该知é“这个问题的解事½W¬äºŒ¾c?/span>Stirling<span style="font-family: 宋体">敎ͼš<img alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/3.2.jpg" border="0" /></span><span style="font-family: 宋体">。这样问题也ž®±å‡ºçŽîCº†åQŒå¦‚æž?/span>k<span style="font-family: 宋体">值固定,那么计算˜q˜æ˜¯å¯è¡Œçš„,如果</span>k<span style="font-family: 宋体">å€ég¸å›ºå®šåQŒå°±è¦å¯¹æ‰€æœ‰çš„å¯èƒ½</span>k<span style="font-family: 宋体">都进行计½Ž—,那è¿è¡Œæ—¶é—´å¯æƒŒ™€ŒçŸ¥äº†ã€‚ç„¶è€ŒåÆˆä¸æ˜¯æ‰€æœ‰çš„å¯è¡Œèšç±»æ–ÒŽ¡ˆéƒ½æ˜¯åˆç†çš„,所谓的åˆç†åQŒæˆ‘ç†è§£ž®±æ˜¯è¯´æŽ¥˜q‘你的蚾cÈ›®æ ‡çš„åQŒä¹‹æ‰€ä»¥æˆ‘们è¦åˆ†ç±»åQŒå¿…然有åˆå§‹åŠ¨æœºåQŒé‚£ä¹ˆå¯ä»¥æ ¹æ®è¿™ä¸ªåŠ¨æœºåˆ¶å®šå¯è¡Œçš„èšç±»æ–ÒŽ¡ˆåQŒè¿™æ øP¼Œå¤æ‚度的问题ž®±å›žé¿äº†ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">™åºåº½Ž—法åQ?/span>sequential algorithms<span style="font-family: 宋体">åQ‰æ˜¯ä¸€¿Uéžå¸¸ç®€å•çš„èšç±»½Ž—法åQŒå¤§å¤šæ•°éƒ½è‡³ž®‘将所有特å¾å‘é‡ä‹É用一‹Æ¡æˆ–几次åQŒæœ€åŽçš„¾l“æžœä¾èµ–于å‘é‡å‚与算法的™åºåºã€‚è¿™¿Uèš¾cÈ®—法一般是ä¸é¢„先知é“èš¾cÀL•°é‡?/span>k<span style="font-family: 宋体">的,但有å¯èƒ½¾l™å‡ºä¸€ä¸ªèš¾cÀL•°ä¸Šç•Œ</span>q<span style="font-family: 宋体">。本文将主è¦ä»‹ç»åŸºæœ¬™åºåº½Ž—法åQ?/span>Basic Sequential Algorithmic Scheme,BSAS<span style="font-family: 宋体">åQ‰å’Œå…¶å‡ ä¸ªå˜¿U,òq¶ç»™å‡ÞZ»£ç å®žçްã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">首先çœ?/span>BSAS<span style="font-family: 宋体">åQŒè¿™ä¸ªç®—法方案需è¦ç”¨æˆ·å®šä¹‰å‚敎ͼšä¸ç›¸ä¼¼æ€§é˜ˆå€?#952;å’Œå…许的最大蚾cÀL•°</span>q<span style="font-family: 宋体">ã€‚ç®—æ³•çš„åŸºæœ¬æ€æƒ³åQšç”±äºŽè¦è€ƒè™‘æ¯ä¸ªæ–°å‘é‡ï¼Œæ ÒŽ®å‘é‡åˆ°å·²æœ‰èš¾cÈš„è·ç¦»åQŒå°†å®ƒåˆ†é…到一个已有的èšç±»ä¸­ï¼Œæˆ–者一个新生æˆçš„èš¾cÖM¸­ã€‚ç®—æ³•çš„ä¼ªç æè¿°å¦‚ä¸‹åQ?/span></p> <p style="margin-left: 18pt; text-indent: -18pt"><em>1.<span style="font: 7pt 'Times New Roman'">       </span></em><em>m</em>=1   /*{<span style="font-family: 宋体">èšç±»æ•°é‡</span>}*/</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>2.<span style="font: 7pt 'Times New Roman'">       </span></em><em>C<sub>m</sub></em>={<em><u>x</u></em><sub>1</sub>}</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>3.<span style="font: 7pt 'Times New Roman'">       </span></em>For <em>i</em>=2 to <em>N</em></p> <p style="margin-left: 18pt; text-indent: -18pt"><em>4.<span style="font: 7pt 'Times New Roman'">       </span></em>    <span style="font-family: 宋体">æ‰?/span><em>C<sub>k</sub>: d</em>(<em><u>x</u><sub>i</sub>,C<sub>k</sub></em>)=<em>min</em><sub>1</sub><sub><span style="font-family: Symbol">£</span><em>j</em></sub><sub><span style="font-family: Symbol">£</span><em>m</em></sub><em>d</em>(<em><u>x</u><sub>i</sub>,C<sub>j</sub></em>)</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>5.<span style="font: 7pt 'Times New Roman'">       </span></em>    If (<em>d</em>(<em><u>x</u><sub>i</sub>,C<sub>k</sub></em>)><em>Θ</em>) <em>AND </em>(<em>m</em><<em>q</em>) then</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>6.<span style="font: 7pt 'Times New Roman'">       </span></em><em>        m</em>=<em>m</em>+1</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>7.<span style="font: 7pt 'Times New Roman'">       </span></em><em>        C<sub>m</sub></em>={<em><u>x</u><sub>i</sub></em>}</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>8.<span style="font: 7pt 'Times New Roman'">       </span></em>    Else</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>9.<span style="font: 7pt 'Times New Roman'">       </span></em><em>        C<sub>k</sub></em>=<em>C<sub>k</sub></em><span style="font-family: Symbol">È</span>{<em><u>x</u><sub>i</sub></em>}</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>10.<span style="font: 7pt 'Times New Roman'">   </span></em>        <span style="font-family: 宋体">如果需è¦ï¼Œæ›´æ–°å‘é‡è¡¨è¾¾</span></p> <p style="margin-left: 18pt; text-indent: -18pt"><em>11.<span style="font: 7pt 'Times New Roman'">   </span></em>    End {if}</p> <p style="margin-left: 18pt; text-indent: -18pt"><em>12.<span style="font: 7pt 'Times New Roman'">   </span></em>End {for}</p> <p style="text-indent: 21pt"><span style="font-family: 宋体">ç”׃¸Šé¢çš„æè¿°å¯ä»¥çœ‹å‡º</span>BSAS<span style="font-family: 宋体">½Ž—法对å‘é‡é¡ºåºéžå¸æ€¾èµ–,无论是蚾cÀL•°é‡è¿˜æ˜¯èš¾cÀLœ¬íw«ï¼Œä¸åŒçš„å‘é‡é¡ºåºä¼šå¯ÆD‡´å®Œå…¨ä¸åŒçš„èš¾cÈ»“果。å¦ä¸€ä¸ªåª„å“èš¾cÈ®—法结果的é‡è¦å› ç´ æ˜¯é˜ˆå€?#952;的选择åQŒè¿™ä¸ªå€¼ç›´æŽ¥åª„哿œ€¾lˆèš¾cÈš„æ•°é‡åQŒå¦‚æž?#952;太å°åQŒå°±ä¼šç”Ÿæˆå¾ˆå¤šä¸å¿…è¦çš„èš¾c»ï¼Œå› äؓ很多情况下å‘é‡ä¸Žèšç±»çš„åˆòq¶æ¡ä»‰™ƒ½å—到θçš„é™åˆÓž¼Œè€Œå¦‚æž?#952;太大åQŒåˆ™èšç±»æ•°é‡åˆä¼šä¸å¤Ÿã€?/span>BSAS<span style="font-family: 宋体">比较适åˆè‡´å¯†èšç±»åQŒå…¶å¯ÒŽ•°æ®é›†˜q›è¡Œä¸€‹Æ¡æ‰«æï¼Œæ¯æ¬¡˜q­ä»£ä¸­è®¡½Ž—当å‰å‘é‡ä¸Žèšç±»é—´çš„è·ç¦»åQŒå› ä¸ºæœ€åŽçš„èšç±»æ•?/span><em>m</em><span style="font-family: 宋体">è¢«è®¤ä¸ø™¿œž®äºŽ</span><em>N</em><span style="font-family: 宋体">åQŒæ•…</span>BSAS<span style="font-family: 宋体">çš„æ—¶é—´å¤æ‚度ä¸?/span><em>O(N)</em><span style="font-family: 宋体">ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">ç”׃ºŽ</span>BSAS<span style="font-family: 宋体">½Ž—法ä¾èµ–äº?/span>q<span style="font-family: 宋体">åQŒå› æ­¤è¿™é‡Œä»‹¾l一¿U自动估计蚾cÀL•°</span>q<span style="font-family: 宋体">çš„ç®€å•æ–¹æ³•,该方法也适用于其他的èšç±»½Ž—法åQŒä×o</span><em>BSAS</em>(<em>Θ</em>)<span style="font-family: 宋体">为具有给定ä¸ç›æ€¼¼é˜ˆå€?#952;çš?/span>BSAS<span style="font-family: 宋体">½Ž—法ã€?/span></p> <p style="margin-left: 18pt; text-indent: -18pt">1.<span style="font: 7pt 'Times New Roman'">       </span>For <em>Θ</em>=<em>a</em> to <em>b</em> step <em>c</em></p> <p style="margin-left: 18pt; text-indent: -18pt">2.<span style="font: 7pt 'Times New Roman'">       </span>   <span style="font-family: 宋体">½Ž—法</span><em>BSAS</em>(<em>Θ</em>)<span style="font-family: 宋体">执行</span>s<span style="font-family: 宋体">‹Æ?/span><span style="font-family: 宋体">åQŒæ¯ä¸€‹Æ¡éƒ½ä½¿ç”¨ä¸åŒçš„顺åºè¡¨½Cºæ•°æ®ã€?/span></p> <p style="margin-left: 18pt; text-indent: -18pt">3.<span style="font: 7pt 'Times New Roman'">       </span>   <span style="font-family: 宋体">估计èšç±»æ•ŽÍ¼Œ</span><em>m</em><em><sub>Θ</sub></em><span style="font-family: 宋体">ä½œäØ“ä»?/span>s<span style="font-family: 宋体">‹Æ?/span><em>BSAS</em>(<em>Θ</em>)<span style="font-family: 宋体">½Ž—法得æ¥çš„æœ€å¸¸å‡ºçŽ°çš„èšç±»æ•°ã€?/span></p> <p style="margin-left: 18pt; text-indent: -18pt">4.<span style="font: 7pt 'Times New Roman'">       </span>Next <em>Θ</em></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">其中</span>a<span style="font-family: 宋体">å’?/span>b<span style="font-family: 宋体">是数æ®é›†çš„æ‰€æœ‰å‘é‡å¯¹çš„æœ€ž®å’Œæœ€å¤§ä¸ç›æ€¼¼¾U§åˆ«åQ?/span>c<span style="font-family: 宋体">的选择直接å?/span><em>d</em>(<em><u>x</u>,C</em>)<span style="font-family: 宋体">的媄å“ã€?/span></p> <h1>2. <span style="font-family: 宋体">½Ž—法实现<br /> </span></h1> <h1> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #0000ff">package</span><span style="color: #000000"> util.clustering;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.ArrayList;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Collection;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Iterator;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.List;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img id="Codehighlighter1_134_161_Open_Image" onclick="this.style.display='none'; Codehighlighter1_134_161_Open_Text.style.display='none'; Codehighlighter1_134_161_Closed_Image.style.display='inline'; Codehighlighter1_134_161_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_134_161_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_134_161_Closed_Text.style.display='none'; Codehighlighter1_134_161_Open_Image.style.display='inline'; Codehighlighter1_134_161_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_134_161_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_134_161_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> * </span><span style="color: #808080">@author</span><span style="color: #008000"> Jia Yu<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> *<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_208_2007_Open_Image" onclick="this.style.display='none'; Codehighlighter1_208_2007_Open_Text.style.display='none'; Codehighlighter1_208_2007_Closed_Image.style.display='inline'; Codehighlighter1_208_2007_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_208_2007_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_208_2007_Closed_Text.style.display='none'; Codehighlighter1_208_2007_Open_Image.style.display='inline'; Codehighlighter1_208_2007_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> BSAS </span><span style="color: #000000"><</span><span style="color: #000000">T </span><span style="color: #0000ff">extends</span><span style="color: #000000"> Clusterable</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">>></span><span style="color: #000000"> </span><span id="Codehighlighter1_208_2007_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_208_2007_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img id="Codehighlighter1_212_271_Open_Image" onclick="this.style.display='none'; Codehighlighter1_212_271_Open_Text.style.display='none'; Codehighlighter1_212_271_Closed_Image.style.display='inline'; Codehighlighter1_212_271_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_212_271_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_212_271_Closed_Text.style.display='none'; Codehighlighter1_212_271_Open_Image.style.display='inline'; Codehighlighter1_212_271_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_212_271_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_212_271_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * Basic Sequential Algorithmic Scheme<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * é€‚用于致密蚾c?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /> <img id="Codehighlighter1_290_293_Open_Image" onclick="this.style.display='none'; Codehighlighter1_290_293_Open_Text.style.display='none'; Codehighlighter1_290_293_Closed_Image.style.display='inline'; Codehighlighter1_290_293_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_290_293_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_290_293_Closed_Text.style.display='none'; Codehighlighter1_290_293_Open_Image.style.display='inline'; Codehighlighter1_290_293_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> BSAS() </span><span id="Codehighlighter1_290_293_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_290_293_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /> <img id="Codehighlighter1_298_547_Open_Image" onclick="this.style.display='none'; Codehighlighter1_298_547_Open_Text.style.display='none'; Codehighlighter1_298_547_Closed_Image.style.display='inline'; Codehighlighter1_298_547_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_298_547_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_298_547_Closed_Text.style.display='none'; Codehighlighter1_298_547_Open_Image.style.display='inline'; Codehighlighter1_298_547_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_298_547_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_298_547_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * Basic Sequential Algorithmic Scheme<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * è€ƒè™‘æ ähœ¬½Iºé—´ä¸­æ¯ä¸ªå‘é‡ï¼Œæ ÒŽ®å‘é‡åˆ°å·²æœ‰çš„èšç±»ä¸­å¿ƒçš„è·¼›»ï¼Œž®†å®ƒåˆ†é…åˆîC¸€ä¸ªå·²æœ‰èš¾cÖM¸­åQŒæˆ–者一个新生æˆçš„èš¾cÖM¸­ã€?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * time complexity is O(N)<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * BSAS½Ž—法å¯ÒŽ•´ä¸ªæ•°æ®é›†åªè¿›è¡Œä¸€‹Æ¡æ‰«æã€?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> points å¾…èš¾cÈš„å‘é‡<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> Phi ç”¨æˆ·å®šä¹‰çš„ä¸ç›æ€¼¼æ€§é˜ˆå€?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> q ç”¨æˆ·å®šä¹‰çš„å…许的最大蚾cÀL•°<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@return</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_638_1839_Open_Image" onclick="this.style.display='none'; Codehighlighter1_638_1839_Open_Text.style.display='none'; Codehighlighter1_638_1839_Closed_Image.style.display='inline'; Codehighlighter1_638_1839_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_638_1839_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_638_1839_Closed_Text.style.display='none'; Codehighlighter1_638_1839_Open_Image.style.display='inline'; Codehighlighter1_638_1839_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> List</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">>></span><span style="color: #000000"> cluster(</span><span style="color: #0000ff">final</span><span style="color: #000000"> Collection</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> points,</span><span style="color: #0000ff">final</span><span style="color: #000000"> </span><span style="color: #0000ff">double</span><span style="color: #000000"> Phi,</span><span style="color: #0000ff">final</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> q)</span><span id="Codehighlighter1_638_1839_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_638_1839_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">int</span><span style="color: #000000"> m </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">int</span><span style="color: #000000"> n </span><span style="color: #000000">=</span><span style="color: #000000"> points.size();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">double</span><span style="color: #000000"> disOfXandCj </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">double</span><span style="color: #000000"> disOfXandCk;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        List</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> ptList </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> ArrayList</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000">(points);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> C </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000">(ptList.get(m));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        C.addPoint(ptList.get(m));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> Ck </span><span style="color: #000000">=</span><span style="color: #000000"> C;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        List</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000"> cList </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> ArrayList</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000">();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        cList.add(C);<br /> <img id="Codehighlighter1_965_1820_Open_Image" onclick="this.style.display='none'; Codehighlighter1_965_1820_Open_Text.style.display='none'; Codehighlighter1_965_1820_Closed_Image.style.display='inline'; Codehighlighter1_965_1820_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_965_1820_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_965_1820_Closed_Text.style.display='none'; Codehighlighter1_965_1820_Open_Image.style.display='inline'; Codehighlighter1_965_1820_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> i</span><span style="color: #000000">=</span><span style="color: #000000">1</span><span style="color: #000000">;i</span><span style="color: #000000"><</span><span style="color: #000000">n;i</span><span style="color: #000000">++</span><span style="color: #000000">)</span><span id="Codehighlighter1_965_1820_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_965_1820_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            disOfXandCk </span><span style="color: #000000">=</span><span style="color: #000000"> Double.MAX_VALUE;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            Iterator</span><span style="color: #000000"><</span><span style="color: #000000">Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000"> cListIt </span><span style="color: #000000">=</span><span style="color: #000000"> cList.iterator(); <br /> <img id="Codehighlighter1_1083_1272_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1083_1272_Open_Text.style.display='none'; Codehighlighter1_1083_1272_Closed_Image.style.display='inline'; Codehighlighter1_1083_1272_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1083_1272_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1083_1272_Closed_Text.style.display='none'; Codehighlighter1_1083_1272_Open_Image.style.display='inline'; Codehighlighter1_1083_1272_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">while</span><span style="color: #000000">(cListIt.hasNext())</span><span id="Codehighlighter1_1083_1272_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1083_1272_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> Cj </span><span style="color: #000000">=</span><span style="color: #000000"> cListIt.next();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                disOfXandCj </span><span style="color: #000000">=</span><span style="color: #000000"> getDisOfPointAndCluster(ptList.get(i),Cj);<br /> <img id="Codehighlighter1_1215_1267_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1215_1267_Open_Text.style.display='none'; Codehighlighter1_1215_1267_Closed_Image.style.display='inline'; Codehighlighter1_1215_1267_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1215_1267_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1215_1267_Closed_Text.style.display='none'; Codehighlighter1_1215_1267_Open_Image.style.display='inline'; Codehighlighter1_1215_1267_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000">(disOfXandCk </span><span style="color: #000000">></span><span style="color: #000000"> disOfXandCj)</span><span id="Codehighlighter1_1215_1267_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1215_1267_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    disOfXandCk </span><span style="color: #000000">=</span><span style="color: #000000"> disOfXandCj;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    Ck </span><span style="color: #000000">=</span><span style="color: #000000"> Cj;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1307_1441_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1307_1441_Open_Text.style.display='none'; Codehighlighter1_1307_1441_Closed_Image.style.display='inline'; Codehighlighter1_1307_1441_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1307_1441_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1307_1441_Closed_Text.style.display='none'; Codehighlighter1_1307_1441_Open_Image.style.display='inline'; Codehighlighter1_1307_1441_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">if</span><span style="color: #000000">(disOfXandCk </span><span style="color: #000000">></span><span style="color: #000000"> Phi </span><span style="color: #000000">&&</span><span style="color: #000000"> m </span><span style="color: #000000"><</span><span style="color: #000000"> q)</span><span id="Codehighlighter1_1307_1441_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1307_1441_Open_Text"><span style="color: #000000">{            </span><span style="color: #008000">//</span><span style="color: #008000">䏿»¡­‘Ïx¡ä»Óž¼Œåˆ™äñ”生新的蚾c?/span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                m</span><span style="color: #000000">++</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> cm </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000">(ptList.get(i));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                cm.addPoint(ptList.get(i));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                cList.add(cm);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1450_1816_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1450_1816_Open_Text.style.display='none'; Codehighlighter1_1450_1816_Closed_Image.style.display='inline'; Codehighlighter1_1450_1816_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1450_1816_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1450_1816_Closed_Text.style.display='none'; Codehighlighter1_1450_1816_Open_Image.style.display='inline'; Codehighlighter1_1450_1816_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">else</span><span id="Codehighlighter1_1450_1816_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1450_1816_Open_Text"><span style="color: #000000">{            </span><span style="color: #008000">//</span><span style="color: #008000">满èƒöæ¡äšg的将点加入已有蚾c»ï¼Œòq¶æ›´æ–°èš¾cÖM¸­å¿?/span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                </span><span style="color: #0000ff">if</span><span style="color: #000000">(cList.contains(Ck))<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    cList.remove(Ck);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                Ck.addPoint(ptList.get(i));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">final</span><span style="color: #000000"> T newCenter </span><span style="color: #000000">=</span><span style="color: #000000"> Ck.getCenter().centroidOf(Ck.getPoints());<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> tempCluster </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000">(newCenter);<br /> <img id="Codehighlighter1_1727_1783_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1727_1783_Open_Text.style.display='none'; Codehighlighter1_1727_1783_Closed_Image.style.display='inline'; Codehighlighter1_1727_1783_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1727_1783_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1727_1783_Closed_Text.style.display='none'; Codehighlighter1_1727_1783_Open_Image.style.display='inline'; Codehighlighter1_1727_1783_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span style="color: #0000ff">for</span><span style="color: #000000">(</span><span style="color: #0000ff">int</span><span style="color: #000000"> j</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000">;j</span><span style="color: #000000"><</span><span style="color: #000000">Ck.getPoints().size();j</span><span style="color: #000000">++</span><span style="color: #000000">)</span><span id="Codehighlighter1_1727_1783_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1727_1783_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    tempCluster.addPoint(Ck.getPoints().get(j));<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                cList.add(tempCluster);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> cList;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img id="Codehighlighter1_1843_1898_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1843_1898_Open_Text.style.display='none'; Codehighlighter1_1843_1898_Closed_Image.style.display='inline'; Codehighlighter1_1843_1898_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1843_1898_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1843_1898_Closed_Text.style.display='none'; Codehighlighter1_1843_1898_Open_Image.style.display='inline'; Codehighlighter1_1843_1898_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_1843_1898_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_1843_1898_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * é€‰æ‹©ä¸åŒçš„æµ‹åº¦ï¼Œæœ‰ä¸åŒçš„½Ž—法ã€?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * ˜q™é‡Œé»˜è®¤dis(x,C)为点到蚾cÖM¸­å¿ƒçš„è·ç¦»ã€?br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1960_2004_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1960_2004_Open_Text.style.display='none'; Codehighlighter1_1960_2004_Closed_Image.style.display='inline'; Codehighlighter1_1960_2004_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1960_2004_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1960_2004_Closed_Text.style.display='none'; Codehighlighter1_1960_2004_Open_Image.style.display='inline'; Codehighlighter1_1960_2004_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">double</span><span style="color: #000000"> getDisOfPointAndCluster(T t, Cluster</span><span style="color: #000000"><</span><span style="color: #000000">T</span><span style="color: #000000">></span><span style="color: #000000"> cj) </span><span id="Codehighlighter1_1960_2004_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1960_2004_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> t.distanceFrom(cj.getCenter());<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /></span></div> </h1> <h1>3. <span style="font-family: 宋体">½E‹åºæ¡†æž¶</span></h1> <p>       <span style="font-family: 宋体">我的èšç±»½E‹åºä¸»è¦æ‰©å±•è‡?/span>Apache Commons Math<span style="font-family: 宋体">å¼€æºæ¡†æžÓž¼Œä¸‹é¢æ˜¯å…¶¾l“æž„åQŒæˆ‘½Ž€å•加入了</span>Clusterer<span style="font-family: 宋体">¾cÖM½œä¸ºæŠ½è±¡æ¨¡æ¿ç±»åQŒä‹Éç”¨æ¨¡æ¿æ–¹æ³•模å¼ä¿®æ”¹äº†æ¡†æž¶åQŒäØ“åŽç®‹åŠ å…¥çš„ä¾‹å¦?/span>BSAS<span style="font-family: 宋体">½Ž—法æä¾›æ¨¡æ¿ã€?br /> </span></p> <h1> <div align="center"><img alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.png" border="0" /></div> </h1> <h1>4. <span style="font-family: 宋体">ž®ç»“</span></h1> <p>       <span style="font-family: 宋体">™åºåº½Ž—法½Ž€å•易实现åQŒå¯¹äºŽå­¦ä¹ èš¾cÀL¥è¯´æ˜¯å…¥é—¨çš„æœ€å¥½é€‰æ‹©åQŒè€ƒè™‘到篇òq…çš„é™åˆ¶åQŒä¸èƒ½å°†ä»£ç å…¨éƒ¨å‘上æ¥ï¼Œå¦‚果有需è¦å¯ä»¥å‘我烦è¦ï¼Œ</span>Apache Commons Math<span style="font-family: 宋体">框架å¯ä»¥åˆ?/span>Apache<span style="font-family: 宋体">的网站上下è²ã€‚å¦å¤–还有很多介¾lä¸å¤Ÿè¯¦¾l†ï¼Œæ„Ÿå…´­‘£çš„æœ‹å‹å¯ä»¥¾l§ç®‹æ·±å…¥ç ”ç©¶</span>BSAS<span style="font-family: 宋体">的扩展ã€?/span></p> <h1>5. <span style="font-family: 宋体">å‚è€ƒæ–‡çŒ®åŠæŽ¨è阅读</span></h1> <p>[1]Pattern Recognition Third Edition, Sergios Theodoridis, Konstantinos Koutroumbas </p> <p>[2]<span style="font-family: 宋体">模å¼è¯†åˆ«</span><span style="font-family: 宋体">½W¬ä¸‰ç‰?/span>, Sergios Theodoridis, Konstantinos Koutroumbas<span style="font-family: 宋体">è‘?/span>, <span style="font-family: 宋体">æŽæ™¶çš?/span>, <span style="font-family: 宋体">王爱ä¾?/span>, <span style="font-family: 宋体">张广æºç­‰è¯?/span></p> <img src ="http://www.aygfsteel.com/changedi/aggbug/314698.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/changedi/" target="_blank">changedi</a> 2010-03-06 15:02 <a href="http://www.aygfsteel.com/changedi/archive/2010/03/06/314698.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>èšç±»½Ž—法学习½W”è®°åQˆäºŒåQ‰â€”—近é‚ÀLµ‹åº?/title><link>http://www.aygfsteel.com/changedi/archive/2010/01/17/309845.html</link><dc:creator>changedi</dc:creator><author>changedi</author><pubDate>Sun, 17 Jan 2010 05:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/changedi/archive/2010/01/17/309845.html</guid><wfw:comment>http://www.aygfsteel.com/changedi/comments/309845.html</wfw:comment><comments>http://www.aygfsteel.com/changedi/archive/2010/01/17/309845.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/changedi/comments/commentRss/309845.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/changedi/services/trackbacks/309845.html</trackback:ping><description><![CDATA[  <h1 style="margin-left: 18pt; text-indent: -18pt">1.<span style="font: 7pt 'Times New Roman'">    </span><span style="font-family: 宋体">‹¹‹åº¦å®šä¹‰</span></h1> <p style="text-indent: 21pt"><span style="font-family: 宋体">“数学上,‹¹‹åº¦</span>(Measure)<span style="font-family: 宋体">是一个函敎ͼŒå®ƒå¯¹ä¸€ä¸ªç»™å®šé›†åˆçš„æŸäº›å­é›†æŒ‡å®šä¸€ä¸ªæ•°åQŒè¿™ä¸ªæ•°å¯ä»¥æ¯”作大å°ã€ä½“¿U¯ã€æ¦‚率等½{‰ã€‚ä¼ ¾lŸçš„¿U¯åˆ†æ˜¯åœ¨åŒºé—´ä¸Šè¿›è¡Œçš„åQŒåŽæ¥äh们希望把¿U¯åˆ†æŽ¨å¹¿åˆîC“Qæ„的集åˆä¸Šï¼Œž®±å‘展出‹¹‹åº¦çš„æ¦‚念,它在数学分æžå’Œæ¦‚率论有é‡è¦çš„åœîC½”</span>                                          <span style="font-family: 宋体">—â€?/span>wikipedia</p> <p style="text-indent: 21pt"><span style="font-family: 宋体">èšç±»ä¹‹å‰ä¸€å®šè¦å®šä¹‰å¥½å‘é‡ä¹‹é—´çš„ç›æ€¼¼½E‹åº¦â€”—峘q‘é‚»‹¹‹åº¦ã€‚在èšç±»˜q‡ç¨‹ä¸­æˆ‘们ä‹É用的‹¹‹åº¦åQŒèŒƒå›´è¦æ›´å¹¿æ³›ï¼Œé¦–先定义å‘é‡ä¹‹é—´çš„æµ‹åº¦ï¼ŒæŽ¥ç€ž®±æ˜¯é›†åˆä¸Žå‘é‡ï¼Œé›†åˆä¹‹é—´çš„æµ‹åº¦ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">对于</span>X<span style="font-family: 宋体">上的<strong>ä¸ç›¸ä¼¼æµ‹åº?/strong></span>(Dissimilarity Measure, DM) <em>d</em> <span style="font-family: 宋体">是一个函敎ͼš<img height="29" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.JPG" width="129" border="0" /></span> <span style="font-family: 宋体">其中</span>R<span style="font-family: 宋体">是实数集åˆï¼Œå¦‚æžœ</span><em>d</em><span style="font-family: 宋体">有以下的属性:</span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="29" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.1.JPG" width="366" border="0" />     <span style="font-family: 宋体">åQ?/span>1.1<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.2.JPG" width="165" border="0" />               <span style="font-family: 宋体">åQ?/span>1.2<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.3.JPG" width="220" border="0" />               <span style="font-family: 宋体">åQ?/span>1.3<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">å¦‚æžœåˆæ»¡­‘?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="32" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.4.JPG" width="240" border="0" />                 <span style="font-family: 宋体">åQ?/span>1.4<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.5.JPG" width="302" border="0" />                <span style="font-family: 宋体">åQ?/span>1.5<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">那么</span><em>d</em><span style="font-family: 宋体">被称为度é‡?/span>DM<span style="font-family: 宋体">。其中的公å¼åQ?/span>1.5<span style="font-family: 宋体">åQ‰ä¹Ÿå«ä¸‰è§’丽{‰å¼ã€‚稽E解释一下(其实太好ç†è§£äº†ï¼‰åQŒä¸ç›æ€¼¼æ€§æµ‹åº¦å…¶å®žå°±åƒæˆ‘们说的跼›ÖM¸€æ øP¼Œä¸¤ä¸ªå‘é‡ä»£è¡¨ä¸¤ä¸ªå¯¹è±¡å¥½äº†ã€‚å…¬å¼?/span>1.2<span style="font-family: 宋体">定义åQˆå‘é‡ï¼‰å¯¹è±¡è‡ªå·±å’Œè‡ªå·Þqš„è·ç¦»æ˜?/span><em>d<sub>0</sub></em><span style="font-family: 宋体">åQ›å…¬å¼?/span>1.1<span style="font-family: 宋体">说明了ä“Qæ„两个对象之间的è·ç¦»è¦å°äºŽæ­£æ— ç©·å´å¤§äºŽè‡ªå·±å’Œè‡ªå·±çš„è·¼›»ï¼ˆä½ å’Œåˆ«äh的跼›Õd¤§äºŽä½ å’Œè‡ªå·Þqš„è·ç¦»åQŒè¿™ä¸åºŸè¯å—åQ¾ï¼¿åQ¾ï¼‰åQ›å…¬å¼?/span>1.3<span style="font-family: 宋体">说明è·ç¦»çš„交互性;公å¼</span>1.4<span style="font-family: 宋体">ä¸è§£é‡Šäº†åQŒå…¬å¼?/span>1.5<span style="font-family: 宋体">ž®±æ˜¯ä¸‰è§’ä¸ç­‰å¼ï¼ˆåˆä¸­æ°´åã^åQ‰ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">åŒç†<strong>ç›æ€¼¼æ€§æµ‹åº?/strong></span>(Similarity Measure, SM)<span style="font-family: 宋体">定义ä¸?img style="width: 128px; height: 29px" height="29" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.0.JPG" width="128" border="0" /></span><span style="font-family: 宋体">满èƒöåQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.6.JPG" width="358" border="0" />         <span style="font-family: 宋体">åQ?/span>1.6<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.7.JPG" width="164" border="0" />        <span style="font-family: 宋体">åQ?/span>1.7<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.8.JPG" width="218" border="0" />         <span style="font-family: 宋体">åQ?/span>1.8<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">å¦‚æžœåˆæ»¡­‘?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="32" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.9.JPG" width="213" border="0" />          <span style="font-family: 宋体">åQ?/span>1.9<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/1.10.JPG" width="406" border="0" />           <span style="font-family: 宋体">åQ?/span>1.10<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">ž®±æŠŠ</span><em>s</em><span style="font-family: 宋体">å«åšåº¦é‡</span>SM<span style="font-family: 宋体">。具体åŒ</span>DM<span style="font-family: 宋体">åQŒå„å…¬å¼çš„表达一目了然哦</span>~~~</p> <p style="text-indent: 21pt"><span style="font-family: 宋体">从定义和字é¢ä¸Šæˆ‘们都å¯ä»¥çœ‹å‡ºäºŒè€…çš„ä¸åŒåQŒåœ¨è¡¨è¾¾ç›æ€¼¼æ€§æ—¶ä¸¤è€…都å¯ä»¥åQŒåªä¸è¿‡åº¦é‡çš„角度ä¸åŒï¼Œå¯¹äºŽåˆ¤åˆ«ç›æ€¼¼åQ?/span>DM<span style="font-family: 宋体">­‘Šå¤§è¯´æ˜Ž­‘Šä¸ç›æ€¼¼åQŒè¶Šž®åˆ™­‘Šç›¸ä¼û|¼Œè€?/span>SM<span style="font-family: 宋体">å´æ­£å¥½ç›¸å,因此我们也å¯ä»¥è”惻I¼Œ</span>DM<span style="font-family: 宋体">ä¸?/span>SM<span style="font-family: 宋体">å¯ä»¥åˆ©ç”¨˜q™ç§å¯¹ç«‹å…³ç³»æ¥å®šä¹‰ã€‚ä‹D例æ¥è¯ß_¼Œå¦‚æžœ</span><em>d</em><span style="font-family: 宋体">是一ä¸?/span>DM<span style="font-family: 宋体">åQŒé‚£ä¹?/span><em>s=</em>1/<em>d</em><span style="font-family: 宋体">ž®±æ˜¯ä¸€ä¸?/span>SM<span style="font-family: 宋体">ã€?/span></p> <h1>2. <span style="font-family: 宋体">å‘é‡ä¹‹é—´çš„è¿‘é‚ÀLµ‹åº?/span></h1> <p style="text-indent: 21pt"><span style="font-family: 宋体">上é¢çš„å®šä¹‰åªæ˜¯ä¸€ä¸ªå®è§‚的概括åQŒé‚£ä¹ˆå…·ä½“çš„å‘é‡ä¹‹é—´çš„æµ‹åº¦å¦‚何计½Ž—å‘¢åQŸä¸‹é¢å°†è¯¦ç»†çš„介¾lã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">首先对于实å‘é‡çš„ä¸ç›¸ä¼¼æµ‹åº¦ï¼Œå®žé™…应用中最通用的就æ˜?strong>加æƒ</strong></span><strong><em>l<sub>p</sub></em></strong><strong><span style="font-family: 宋体">度é‡</span></strong><span style="font-family: 宋体">了:</span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="48" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.1.JPG" width="242" border="0" />          <span style="font-family: 宋体">åQ?/span>2.1<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">其中çš?/span><em>x<sub>i</sub></em><span style="font-family: 宋体">å’?/span><em>y<sub>i</sub></em><span style="font-family: 宋体">分别是å‘é‡?/span><em><u>x</u></em><span style="font-family: 宋体">å’?/span><em><u>y</u></em><span style="font-family: 宋体">中的½W?/span><em>i</em><span style="font-family: 宋体">个å€û|¼Œ</span><em>w<sub>i</sub></em><span style="font-family: 宋体">是第</span><em>i</em><span style="font-family: 宋体">个æƒé‡ç³»æ•ŽÍ¼Œ</span><em>l</em><span style="font-family: 宋体">是å‘é‡çš„¾l´æ•°åQˆä»¥ä¸‹å…¬å¼å®šä¹‰åŒåQ‰ã€‚而我们比较感兴趣的就是当</span>p=1<span style="font-family: 宋体">æ—Óž¼Œè¯¥åº¦é‡å°±æ˜¯åŠ æ?/span>Manhattan<span style="font-family: 宋体">范数åQŒè€Œå½“</span>p=2<span style="font-family: 宋体">æ—¶å°±æ˜¯åŠ æƒæ¬§å‡ é‡Œå¾—范敎ͼŒå½?/span>p=<span style="font-family: 宋体">∞</span><span style="font-family: 宋体">æ—¶å°±æ˜?/span>max<em><sub>1</sub></em><sub><span style="font-family: Symbol">£</span></sub><em><sub>i</sub></em><sub><span style="font-family: Symbol">£</span></sub><em><sub>l</sub></em> <em>w<sub>i</sub></em>|<em>x<sub>i</sub>-y<sub>i</sub></em>|<span style="font-family: 宋体">了。根æ®è¿™äº?/span>DM<span style="font-family: 宋体">åQŒæˆ‘们定ä¹?/span>SM<span style="font-family: 宋体">ä¸?/span><em>b<sub>max </sub>- d<sub>p</sub>(<u>x</u>,<u>y</u>)</em><span style="font-family: 宋体">ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">å¦å¤–˜q˜æœ‰ä¸€äº›å…¶ä»–的定义æ–ÒŽ³•åQŒæ¯”å¦?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="54" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.2.JPG" width="288" border="0" />            <span style="font-family: 宋体">åQ?/span>2.2<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><img height="62" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.3.JPG" width="213" border="0" />          <span style="font-family: 宋体">åQ?/span>2.3<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">其他懒得列出了,先查阅资料,˜q™é‡Œä¸è¯¦˜qîCº†ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">对于实å‘é‡çš„ç›æ€¼¼æ€§æµ‹åº¦ï¼Œå®žé™…中常用的有:</span></p> <p style="text-indent: 21pt; text-align: center" align="center"><span style="font-family: 宋体">内积åQ?img height="48" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.4.JPG" width="208" border="0" /></span>          <span style="font-family: 宋体">åQ?/span>2.4<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><em>Tanimoto</em><span style="font-family: 宋体">‹¹‹åº¦åQ?img height="57" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.5.JPG" width="261" border="0" /></span>           <span style="font-family: 宋体">åQ?/span>2.5<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><span style="font-family: 宋体">å…¶ä»–åQ?img height="50" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.6.JPG" width="229" border="0" /></span>           <span style="font-family: 宋体">åQ?/span>2.6<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt" align="center">------------------------------------------------take a nap------------------------------------------------------------</p> <p style="text-indent: 21pt"><span style="font-family: 宋体">对于¼›ÀL•£å€¼çš„å‘é‡åQŒé¦–先必™å»è¦æžæ¸…楚一个概念,˜q™é‡Œåœ¨ã€Šæ¨¡å¼è¯†åˆ«ã€‹çš„中文译作中我感觉¾˜»è¯‘çš„åÆˆä¸å¥½ç†è§£åQŒæ‰€ä»¥è¿™é‡Œå±•开说明一下,那就是一个å«åšç›¸ä¾è¡¨</span>(contingency table)<span style="font-family: 宋体">的概å¿üc€‚对于一个å‘é‡?/span><em><u>x</u></em><span style="font-family: 宋体">åQŒå…¶å…ƒç´ å€¼å±žäºŽæœ‰é™é›†</span><em>F=</em>{0<em>,</em>1<em>,…,k</em>-1}<span style="font-family: 宋体">åQŒå…¶ä¸?/span>k<span style="font-family: 宋体">是正整数。ä×o</span><em>A</em>(<em><u>x</u>,<u>y</u></em>)=[<em>a<sub>ij</sub></em>]<em>, i, j</em>=0<em>,</em>1<em>,…,k</em>-1<span style="font-family: 宋体">是一ä¸?/span><em>k</em><span style="font-family: 宋体">阶方阵,其中元素</span><em>a<sub>ij</sub></em><span style="font-family: 宋体">代表åœ?/span><em><u>x</u></em><span style="font-family: 宋体">中所æœ?/span><em>i</em><span style="font-family: 宋体">值所在的ä½ç½®åœ?/span><em><u>y</u></em><span style="font-family: 宋体">çš„åŒæ ·ä½¾|®æœ‰</span><em>j</em><span style="font-family: 宋体">值的个数。附原文åQ?/span>the number of places where <em><u>x</u></em> has the <em>i</em>-th symbol and <em><u>y</u></em> has the <em>j</em>-th symbol<span style="font-family: 宋体">。ä‹D例æ¥è¯´å§åQ?/span><em>k</em>=3<span style="font-family: 宋体">åQŒä¸”</span><em><u>x</u></em>=[0,1,2,1,2,1]<span style="font-family: 宋体">åQ?/span><em><u>y</u></em>=[1,0,2,1,0,1]<span style="font-family: 宋体">åQŒé‚£ä¹?/span><em>A(<u>x</u>,<u>y</u>)</em> = [0 1 0, 1 2 0, 1 0 1]<span style="font-family: 宋体">。以½W¬ä¸€ä¸?/span>0(<em>a<sub>00</sub></em>)<span style="font-family: 宋体">ä¸ÞZ¾‹è¯´æ˜ŽåQ?/span>0<span style="font-family: 宋体">åœ?/span><em>A</em><span style="font-family: 宋体">中的ä½ç½®å†›_®š</span><em>i</em>=0<span style="font-family: 宋体">åQ?/span><em>j</em>=0<span style="font-family: 宋体">åQŒåœ¨</span><em><u>x</u></em><span style="font-family: 宋体">ä¸?/span>0<span style="font-family: 宋体">所在的ä½ç½®æ˜¯ç¬¬ä¸€ä¸ªä½¾|®ï¼Œè€?/span><em><u>y</u></em><span style="font-family: 宋体">ä¸?/span>0<span style="font-family: 宋体">所在的ä½ç½®ä¸ºç¬¬äºŒä¸ªå’Œç¬¬äº”个åQŒä¸¤ä¸ªå‘é‡ä¸­æ²¡æœ‰ç›¸åŒä½ç½®ä¸Šçš„相åŒ</span>0<span style="font-family: 宋体">元素åQŒå› æ­?/span><em>A</em><span style="font-family: 宋体">中第一个元ç´?/span><em>a<sub>00</sub></em><span style="font-family: 宋体">ä¸?/span>0<span style="font-family: 宋体">åQŒè€?/span><em>A</em><span style="font-family: 宋体">中第二个ä¸?/span>1(<em>a<sub>01</sub></em>)<span style="font-family: 宋体">åQŒæ‰€ä»?/span><em>i</em>=0<span style="font-family: 宋体">åQ?/span><em>j</em>=1<span style="font-family: 宋体">åQŒåœ¨</span><em><u>x</u></em><span style="font-family: 宋体">ä¸?/span>0<span style="font-family: 宋体">所在的ä½ç½®æ˜¯ç¬¬ä¸€ä¸ªï¼Œè€?/span><em><u>y</u></em><span style="font-family: 宋体">ä¸?/span>1<span style="font-family: 宋体">所在的ä½ç½®ä¸ºç¬¬ä¸€ã€å››ã€å…­ä¸ªï¼Œå› æ­¤æœ‰ä¸€ä¸ªç›¸åŒï¼Œæ‰€ä»?/span><em>a<sub>01</sub></em>=1<span style="font-family: 宋体">ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">关于计算矩阵</span><em>A</em><span style="font-family: 宋体">˜q™é‡Œé™„加</span>java<span style="font-family: 宋体">代ç å®žçްåQŒå¯å‚考:</span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体"></p> <p style="text-indent: 21pt"></p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img id="Codehighlighter1_0_235_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_235_Open_Text.style.display='none'; Codehighlighter1_0_235_Closed_Image.style.display='inline'; Codehighlighter1_0_235_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_0_235_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_0_235_Closed_Text.style.display='none'; Codehighlighter1_0_235_Open_Image.style.display='inline'; Codehighlighter1_0_235_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span id="Codehighlighter1_0_235_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_0_235_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * <br /> </span><span style="color: #008080"> 3</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> k<br /> </span><span style="color: #008080"> 4</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     *            the number of finite set F<br /> </span><span style="color: #008080"> 5</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> x<br /> </span><span style="color: #008080"> 6</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     *            the vector x belongs to F^l<br /> </span><span style="color: #008080"> 7</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> y<br /> </span><span style="color: #008080"> 8</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     *            the vector y belongs to F^l<br /> </span><span style="color: #008080"> 9</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@return</span><span style="color: #008000"> the contingency table A<br /> </span><span style="color: #008080">10</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     * </span><span style="color: #808080">@author</span><span style="color: #008000"> $Jia Yu<br /> </span><span style="color: #008080">11</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> Integer[][] calContingencyTable(Integer k, Vector</span><span style="color: #000000"><</span><span style="color: #000000">Integer</span><span style="color: #000000">></span><span style="color: #000000"> x,<br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img id="Codehighlighter1_329_765_Open_Image" onclick="this.style.display='none'; Codehighlighter1_329_765_Open_Text.style.display='none'; Codehighlighter1_329_765_Closed_Image.style.display='inline'; Codehighlighter1_329_765_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_329_765_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_329_765_Closed_Text.style.display='none'; Codehighlighter1_329_765_Open_Image.style.display='inline'; Codehighlighter1_329_765_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            Vector</span><span style="color: #000000"><</span><span style="color: #000000">Integer</span><span style="color: #000000">></span><span style="color: #000000"> y) </span><span id="Codehighlighter1_329_765_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_329_765_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (x.size() </span><span style="color: #000000">!=</span><span style="color: #000000"> y.size())<br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff">throw</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> IllegalArgumentException(<br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    </span><span style="color: #000000">"</span><span style="color: #000000">The two vectors are not the same size!</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        Integer[][] A </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Integer[k][k];<br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        Integer count_ij;<br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img id="Codehighlighter1_533_750_Open_Image" onclick="this.style.display='none'; Codehighlighter1_533_750_Open_Text.style.display='none'; Codehighlighter1_533_750_Closed_Image.style.display='inline'; Codehighlighter1_533_750_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_533_750_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_533_750_Closed_Text.style.display='none'; Codehighlighter1_533_750_Open_Image.style.display='inline'; Codehighlighter1_533_750_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> k; i</span><span style="color: #000000">++</span><span style="color: #000000">) </span><span id="Codehighlighter1_533_750_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_533_750_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img id="Codehighlighter1_566_746_Open_Image" onclick="this.style.display='none'; Codehighlighter1_566_746_Open_Text.style.display='none'; Codehighlighter1_566_746_Closed_Image.style.display='inline'; Codehighlighter1_566_746_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_566_746_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_566_746_Closed_Text.style.display='none'; Codehighlighter1_566_746_Open_Image.style.display='inline'; Codehighlighter1_566_746_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> j </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">; j </span><span style="color: #000000"><</span><span style="color: #000000"> k; j</span><span style="color: #000000">++</span><span style="color: #000000">) </span><span id="Codehighlighter1_566_746_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_566_746_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                count_ij </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img id="Codehighlighter1_628_717_Open_Image" onclick="this.style.display='none'; Codehighlighter1_628_717_Open_Text.style.display='none'; Codehighlighter1_628_717_Closed_Image.style.display='inline'; Codehighlighter1_628_717_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_628_717_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_628_717_Closed_Text.style.display='none'; Codehighlighter1_628_717_Open_Image.style.display='inline'; Codehighlighter1_628_717_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> xi </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">; xi </span><span style="color: #000000"><</span><span style="color: #000000"> x.size(); xi</span><span style="color: #000000">++</span><span style="color: #000000">) </span><span id="Codehighlighter1_628_717_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_628_717_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    </span><span style="color: #0000ff">if</span><span style="color: #000000"> (x.elementAt(xi).equals(i) </span><span style="color: #000000">&&</span><span style="color: #000000"> y.elementAt(xi).equals(j))<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                        count_ij</span><span style="color: #000000">++</span><span style="color: #000000">;<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                A[i][j] </span><span style="color: #000000">=</span><span style="color: #000000"> count_ij;<br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> A;<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span></span></div> <p style="text-indent: 21pt"><br /> æœ‰äº†ç›æ€¾è¡¨çš„定义åQŒå¯ä»¥å®šä¹‰ç¦»æ•£å‘é‡ä¹‹é—´çš„ä¸ç›¸ä¼¼æ€§æµ‹åº¦äº†ã€?/span></p> <p style="text-indent: 21pt; text-align: center" align="center"><span style="font-family: 宋体">汉明è·ç¦»åQ?img height="58" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.7.JPG" width="150" border="0" /></span>          <span style="font-family: 宋体">åQ?/span>2.7<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt; text-align: center" align="center">L1<span style="font-family: 宋体">è·ç¦»åQ?img height="48" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.8.JPG" width="176" border="0" /></span>              <span style="font-family: 宋体">åQ?/span>2.8<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">åŒæ ·åQŒç›¸ä¼¼æ€§æµ‹åº¦æœ‰</span></p> <p style="text-indent: 21pt; text-align: center" align="center">Tanimoto<span style="font-family: 宋体">‹¹‹åº¦åQ?img height="93" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/2.9.JPG" width="225" border="0" /></span>             <span style="font-family: 宋体">åQ?/span>2.9<span style="font-family: 宋体">åQ?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">其中çš?/span><em>n<sub>x</sub></em>( <em>n<sub>y</sub></em>)<span style="font-family: 宋体">表示</span><em><u>x</u></em>(<em><u>y</u></em>)<span style="font-family: 宋体">中éžé›¶å…ƒç´ çš„个数ã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">ä¹¦æœ¬å¾€å¾€æ•™ç»™æˆ‘ä»¬çš„æ˜¯åŸºç¡€è€Œä¸æ˜¯åº”用,˜q™äº›åŸºç¡€çŸ¥è¯†åœ¨å®žé™…应用中æ‰ä¼šå¾—到更多的改˜q›å’Œå˜åŒ–。也许我们ä¸ä¼šç®€å•的在蚾cÖM¸­åº”用˜q™äº›‹¹‹åº¦æ¦‚念åQŒä½†æ˜¯å¤æ‚çš„¾l„åˆéƒ½æ˜¯æ¥æºäºŽåŸº¼‹€ã€‚因此,å¯Ò޵‹åº¦çš„基础概念一定è¦ç‰¢ç‰¢æŠŠæ¡ã€‚在å‰ä¸€é˜¶æ®µåšå›¾åƒåˆ†å‰²æ—¶åQŒèš¾cÈ®—æ³•æ‰§è¡Œçš„å‰æä¹‹ä¸€‹¹‹åº¦åQŒæˆ‘ž®±åš˜q‡å¤šä¸ªå®žéªŒï¼Œ</span>L1<span style="font-family: 宋体">å’?/span>L2<span style="font-family: 宋体">范数åQ?/span>Tanimoto<span style="font-family: 宋体">‹¹‹åº¦½{‰ã€‚当然ä¸åŒçš„å›‘Öƒç‰¹å¾æœ‰ä¸åŒçš„计算è·ç¦»æ–ÒŽ³•åQŒæ€ÖM¹‹å®žé™…çš„ç»éªŒå‘Šè¯‰æˆ‘åQŒåŸº¼‹€æ‰Žå®žåŽï¼Œåœ¨åº”用è“væ¥æ˜¯ç›¸å½“的顺手啊</span>~~~<span style="font-family: 宋体">åQˆæœ€èµïL ä¸ä¼šè¢«å¤æ‚å…¬å¼å“刎ͼ‰</span></p> <h1>3. <span style="font-family: 宋体">ç‰Òޮпƒ…况处ç†</span></h1> <p>       <span style="font-family: 宋体">考虑到实例å‘é‡çš„特徾cÕdž‹å¾€å¾€æ˜¯å¤æ‚æØœåˆçš„åQŒè¿™¿U情况下åQŒå¦‚何计½Ž—è¿‘é‚ÀLµ‹åº¦å‘¢åQŸä¸€äº›å·æ‡’çš„åšæ³•ž®±æ˜¯ž®†æ‰€æœ‰å€¼éƒ½çœ‹ä½œæ˜¯å®žå€¼ç±»åž‹ï¼ŒæŠŠæØœåˆå‘é‡å½“作实å‘釿¥å¤„ç†ã€‚但是现实ä‹É用中åQŒè¿™æ ·åšçš„æ•ˆæžœå¾€å¾€å·®å¼ºäººæ„。考虑ž®†å®žå€¼ç±»åž‹è{æ¢æˆ¼›ÀL•£¾cÕdž‹åQŒè¿™ž®±æ˜¯è‘—å的离散化了,特å¾çš„离散化æ“ä½œæ—¶ç‰¹å¾æˆ–属性过æ»?/span>(filter)<span style="font-family: 宋体">的一个é‡è¦çš„æ–šw¢ã€‚当然我最推è的还是基于自己开å‘的应用场景åQŒè®¾è®¡ç›¸å…³çš„˜q‘é‚»‹¹‹åº¦ã€‚这样å¯èƒ½é€šç”¨æ€§æ¯”较差åQŒä½†æ˜¯å¦‚果是问题驱动的è¯åQŒæˆ–者目标驱动,那么˜q™ä¸ªä½œäؓ一ä¸?/span>solution<span style="font-family: 宋体">也ä¸å¤×ƒ¼˜è‰¯æ€§ã€‚当然引入模¾pŠæµ‹åº¦çš„æ¦‚念也是一¿Uè§£å†Ïx–¹æ³•,˜q™é‡Œž®×ƒ¸¾l†è¯´äº†ï¼Œå…·ä½“应用å¯ä»¥å‚看有关模糊和丼‹®å®šæ€§çš„æ–‡ç« ã€‚å¦å¤–一炚wœ€è¦è¯´æ˜Žå°±æ˜¯å®žä¾‹å‘é‡ä¸­éƒ¨åˆ†ç‰¹å¾ä¸¢å¤±çš„æƒ…况,对于丢失数æ®åQŒå¦‚æžœæˆ‘ä»¬çŸ¥é“æ•°æ®çš„分布åQŒé‚£ä¹ˆåˆç†å‡è®¾æ˜¯ä¸€ä¸ªæ›¿ä»£æ–¹æ¡ˆï¼Œä½†æ˜¯å¦‚æžœä¸ÞZº†çœäº‹åQŒå¸¸ç”¨çš„åšæ³•是直接丢弃该实例å‘é‡åQŒæˆ–è€…å¥½ç‚¹çš„åšæ³•æ˜¯å–æ‰€æœ‰å®žä¾‹çš„òq›_‡æ•°æ®ä½œäؓ该维度的替代数æ®ã€?/span></p> <h1>4. <span style="font-family: 宋体">点与集åˆä¹‹é—´çš„æµ‹åº?/span></h1> <p>       <span style="font-family: 宋体">éšç€èšç±»˜q‡ç¨‹çš„䏿–­è¿›è¡Œï¼Œå±‚æ¬¡é€æ¸æ·±å…¥åQŒèš¾cÕd·²¾lä¸ä»…仅是判断点与点之间的相似程度了åQŒç‚¹ä¸Žé›†åˆçš„ç›æ€¼¼½E‹åº¦ä¹Ÿéœ€è¦è®¡½Ž—。而如何定义å‘é‡?/span><em><u>x</u></em><span style="font-family: 宋体">和蚾c?/span><em>C</em><span style="font-family: 宋体">之间的近é‚ÀL€§ï¼Œä»Žè€Œåˆ¤æ–­æ˜¯å¦å°†</span><em><u>x</u></em><span style="font-family: 宋体">å½’ç±»ä¸?/span><em>C</em><span style="font-family: 宋体">。以下三个定义ç»å¸¸ç”¨åˆ°ã€?/span></p> <p style="text-align: center" align="center"><span style="font-family: 宋体">最大近é‚Õd‡½æ•?/span>Max proximity function<span style="font-family: 宋体">åQ?/span> <img height="30" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/4.1.JPG" width="197" border="0" />          <span style="font-family: 宋体">åQ?/span>4.1<span style="font-family: 宋体">åQ?/span></p> <p style="text-align: center" align="center"><span style="font-family: 宋体">最ž®è¿‘é‚Õd‡½æ•?/span>Min proximity function<span style="font-family: 宋体">åQ?img height="30" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/4.2.JPG" width="197" border="0" /></span>           <span style="font-family: 宋体">åQ?/span>4.2<span style="font-family: 宋体">åQ?/span></p> <p style="text-align: center" align="center"><span style="font-family: 宋体">òq›_‡˜q‘邻函数</span>Average proximity function<span style="font-family: 宋体">åQ?img height="49" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/4.3.JPG" width="193" border="0" /></span>       <span style="font-family: 宋体">åQ?/span>4.3<span style="font-family: 宋体">åQ?/span></p> <p><span style="font-family: 宋体">其中</span><em>n<sub>c</sub></em><span style="font-family: 宋体">是集å?/span>C<span style="font-family: 宋体">的势ã€?/span></p> <p>       <span style="font-family: 宋体">å¯ä»¥çœ‹åˆ°åQŒè¿™æ ïLš„定义在概å¿ëŠ†è®ºå±‚‹Æ¡ä¸Šä»æ—§ž®†ç‚¹è§†ä½œç‚¹ï¼Œž®†èš¾c»è§†ä½œé›†åˆã€‚å¦ä¸€¿U情况则是将èšç±»è§†ä½œä¸€ä¸ªç‚¹åQŒå› ä¸ºç‚¹ä¸Žç‚¹ä¹‹é—´çš„è¿‘é‚ÀLµ‹åº¦å·²¾lå¯ä»¥è®¡½Ž—,那么ž®†é›†åˆè§†ä¸ÞZ¸€ä¸ªç‚¹åQŒå°±ž®†è¿™ä¸ªé—®é¢˜å½’¾U¦åˆ°äº†ç‚¹ä¸Žç‚¹ä¹‹é—´çš„问题了。对èšç±»˜q›è¡Œè¡¨è¾¾åQŒä¸»è¦æœ‰ä»¥ä¸‹å‡ ç§è¡¨è¾¾åQ?/span></p> <p style="margin-left: 42.75pt; text-indent: -21.75pt">1åQ?span style="font: 7pt 'Times New Roman'">    </span><span style="font-family: 宋体">点表达:ž®†èš¾c»è§†ä½œä¸€ä¸ªç‚¹åQŒå¯ä»¥æ˜¯å‡å€¼ç‚¹</span>(mean vector)<span style="font-family: 宋体">åQŒä¹Ÿå¯ä»¥æ˜¯å‡å€ég¸­å¿?/span>(mean center)<span style="font-family: 宋体">åQŒä¹Ÿå¯ä»¥æ˜¯ä¸­å€ég¸­å¿?/span>(median center)<span style="font-family: 宋体">。关于这几个概念和公å¼ï¼Œä»ÖM½•的统计教æé‡Œéƒ½æœ‰æ¶‰çŒŽåQŒæˆ‘ž®×ƒ¸ä¸€ä¸€æžšä‹D了。(主è¦è´´å…¬å¼çœŸçš„很累,怀å¿?/span>Tex<span style="font-family: 宋体">åQ?/span></p> <p style="margin-left: 42.75pt; text-indent: -21.75pt">2åQ?span style="font: 7pt 'Times New Roman'">    </span><span style="font-family: 宋体">­‘…åã^é¢è¡¨è¾¾ï¼š¾U¿æ€§èš¾cÖM¸­å¸¸ç”¨ã€‚ä¸è¡¨ã€‚有兴趣者去查资料ã€?/span></p> <p style="margin-left: 42.75pt; text-indent: -21.75pt">3åQ?span style="font: 7pt 'Times New Roman'">    </span><span style="font-family: 宋体">­‘…çƒé¢è¡¨è¾¾ï¼šçƒåÅžèšç±»ä¸­å¸¸ç”¨ã€‚åŒä¸Šã€?/span></p> <p style="text-indent: 21pt"><span style="font-family: 宋体">ä¸€åˆ‡çš„å­¦ä¹ éƒ½äØ“åº”ç”¨åQŒæ ¹æ®å®žé™…应用的ä¸åŒåQŒæˆ‘们在定义˜q™ç§ç‚¹ä¸Žé›†åˆä¹‹é—´‹¹‹åº¦æ—¶å€™ä¹Ÿæœ‰å¾ˆå¤§çš„ç‰|´»æ€§ã€?/span></p> <h1>5. <span style="font-family: 宋体">集åˆä¸Žé›†åˆä¹‹é—´çš„‹¹‹åº¦</span></h1> <p style="text-indent: 21pt"><span style="font-family: 宋体">åŒæ ·çš„,对于集åˆä¸Žé›†åˆçš„‹¹‹åº¦åQŒå¯ä»¥åŒç‚¹ä¸Žé›†åˆçš„æµ‹åº¦ç±»ä¼¹{€‚åªè¦è®°ä½ä¸€ç‚¹ï¼Œé‚£å°±æ˜¯é›†åˆä¸Žé›†åˆé—´çš„˜q‘é‚»‹¹‹åº¦æ˜¯å¾ç«‹åœ¨ç‚¹ä¸Žç‚¹ä¹‹é—´çš„‹¹‹åº¦çš„基¼‹€ä¸Šçš„。所以近é‚ÀLµ‹åº¦çš„基础在点与点之间。当然蚾cÈ»“果的优化是一个åå¤è¯•验的˜q‡ç¨‹åQŒå…¶ä¸­ä¹Ÿè¦è€ƒè™‘领域专家的æ„è§ã€?/span></p> <h1>6. <span style="font-family: 宋体">ž®ç»“</span></h1> <p style="text-indent: 21pt"><span style="font-family: 宋体">对于˜q‘é‚»‹¹‹åº¦çš„学习,ä¹ä¸€çœ‹åƒæ˜¯çº¯æ•°å­¦çŸ¥è¯†çš„学习,其实则是å¯ÒŽˆ‘们开始蚾cÈ®—法研½I¶ä¹‹å‰çš„一个夯实基¼‹€çš„å¤ä¹ è¿‡½E‹ã€?/span></p> <h1>7. <span style="font-family: 宋体">å‚è€ƒæ–‡çŒ®åŠæŽ¨è阅读</span></h1> <p>[1]Pattern Recognition Third Edition, Sergios Theodoridis, Konstantinos Koutroumbas</p> <p>[2] http://zh.wikipedia.org/wiki/%E6%B5%8B%E5%BA%A6%E8%AE%BA</p> <p>[3]<span style="font-family: 宋体">模å¼è¯†åˆ«</span><span style="font-family: 宋体">½W¬ä¸‰ç‰?/span>, Sergios Theodoridis, Konstantinos Koutroumbas<span style="font-family: 宋体">è‘?/span>, <span style="font-family: 宋体">æŽæ™¶çš?/span>, <span style="font-family: 宋体">王爱ä¾?/span>, <span style="font-family: 宋体">张广æºç­‰è¯?/span></p> <img src ="http://www.aygfsteel.com/changedi/aggbug/309845.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/changedi/" target="_blank">changedi</a> 2010-01-17 13:10 <a href="http://www.aygfsteel.com/changedi/archive/2010/01/17/309845.html#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>èšç±»½Ž—法学习½W”è®°åQˆä¸€åQ‰â€”—基¼‹€http://www.aygfsteel.com/changedi/archive/2010/01/11/308984.htmlchangedichangediMon, 11 Jan 2010 02:39:00 GMThttp://www.aygfsteel.com/changedi/archive/2010/01/11/308984.htmlhttp://www.aygfsteel.com/changedi/comments/308984.htmlhttp://www.aygfsteel.com/changedi/archive/2010/01/11/308984.html#Feedback1http://www.aygfsteel.com/changedi/comments/commentRss/308984.htmlhttp://www.aygfsteel.com/changedi/services/trackbacks/308984.html0. 引å­

传说åQ?#8220;èšç±»æ˜¯äh¾cÀLœ€åŽŸå§‹çš„ç²¾¼œžæ´»åŠ¨ï¼Œç”¨äºŽå¤„ç†ä»–们æ¯å¤©æŽ¥æ”¶åˆ°çš„大é‡ä¿¡æ¯”ã€‚äØ“æ–¹ä¾¿òq¿å¤§åŒå­¦å­¦ä¹ ä½¿ç”¨åQŒå°†æˆ‘学习蚾cÀL—¶çš„笔记整ç†å‘布共享ã€?/span>

1. èšç±»å®šä¹‰

“èšç±»æ˜¯æŠŠç›æ€¼¼çš„å¯¹è±¡é€šè¿‡é™æ€åˆ†¾cÈš„æ–ÒŽ³•分æˆä¸åŒçš„组别或者更多的å­é›†åQ?/span>subsetåQ?/span>,˜q™æ ·è®©åœ¨åŒä¸€ä¸ªå­é›†ä¸­çš„æˆå‘˜å¯¹è±¡éƒ½æœ‰ç›¸ä¼¼çš„ä¸€äº›å±žæ€§ã€?#8221;                                                          —â€?/span>wikipedia

èšç±»åˆ†æžæŒ‡å°†ç‰©ç†æˆ–抽象对象的集åˆåˆ†ç»„æˆäØ“ç”Þq±»ä¼¼çš„对象¾l„æˆçš„多个类的分æžè¿‡½E‹ã€‚它是一¿Ué‡è¦çš„äººç±»è¡ŒäØ“ã€‚èš¾cÀL˜¯ž®†æ•°æ®åˆ†¾cÕdˆ°ä¸åŒçš„类或者簇˜q™æ ·çš„一个过½E‹ï¼Œæ‰€ä»¥åŒä¸€ä¸ªç°‡ä¸­çš„å¯¹è±¡æœ‰å¾ˆå¤§çš„ç›æ€¼¼æ€§ï¼Œè€Œä¸åŒç°‡é—´çš„对象有很大的相异性ã€?/span>                          ——百度百¿U?/span>

说白了,èšç±»åQ?/span>clusteringåQ‰æ˜¯å®Œå…¨å¯ä»¥æŒ‰å­—颿„æ€æ¥ç†è§£çš„——将相åŒã€ç›¸ä¼¹{€ç›¸˜q‘ã€ç›¸å…³çš„å¯¹è±¡å®žä¾‹èšæˆä¸€¾cÈš„˜q‡ç¨‹ã€‚简å•ç†è§£ï¼Œå¦‚果一个数æ®é›†åˆåŒ…å?/span>N个实例,æ ÒŽ®æŸç§å‡†åˆ™å¯ä»¥ž®†è¿™Nä¸ªå®žä¾‹åˆ’åˆ†äØ“m个类别,æ¯ä¸ª¾cÕdˆ«ä¸­çš„实例都是相关的,而ä¸åŒç±»åˆ«ä¹‹é—´æ˜¯åŒºåˆ«çš„也ž®±æ˜¯ä¸ç›¸å…³çš„åQŒè¿™ä¸ªè¿‡½E‹å°±å«èš¾cÖMº†ã€?/span>

å½¢å¼åŒ–一点,ä»?img style="width: 162px; height: 22px" height="22" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/abc.JPG" width="162" border="0" />åQŒå…¶ä¸­çš„x都是å‘é‡åQŒä¸€ä¸?/span>Xçš?/span>mèšç±»Rž®?/span>X分割ä¸?/span>m个集å?/span>C1, C2,…,CmåQŒä‹É其满­‘³ä¸‹é¢ä¸‰ä¸ªæ¡ä»Óž¼š

åQ?/span>1åQ?img height="22" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/abcd.JPG" width="162" border="0" />

åQ?/span>2åQ?img height="37" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/abcde.JPG" width="70" border="0" />

åQ?/span>3åQ?img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/ff.JPG" width="275" border="0" />

满èƒö上述æ¡äšgçš„åŒæ—Óž¼Œåœ¨èš¾c?/span>Ci中的å‘é‡å½¼æ­¤ç›æ€¼¼åQŒè€Œä¸Žå…¶ä»–¾cÖM¸­çš„å‘é‡ä¸ç›æ€¼¼ã€?/span>

但是˜q™ç§å®šä¹‰ä¹Ÿåªæ˜¯å®šä¹‰äº†¼‹®å®šæ€§çš„èšç±»åQŒä¹Ÿå«åš¼‹¬èš¾c?/span>(hard clustering)åQŒæ¯ä¸ªå®žä¾?/span>x都确定的属于æŸä¸ªèšç±»ã€‚而丼‹®å®šæ€§èš¾c»ï¼Œä¹Ÿéœ€è¦å®šä¹‰ï¼Œ˜q™å°±å¼•出了模¾pŠèš¾c?/span>(fuzzy clustering)的概念了。模¾pŠèš¾cÖM¸­åQŒæ¯ä¸ªå®žä¾‹å‘é‡?/span>x以一定的隶属度属于æŸä¸ªèš¾c…R€‚åŒä¸Šé¢çš„设¾|®ï¼ŒX的模¾pŠèš¾cÀL˜¯ž®?/span>X分æˆm个类åQŒç”±m个函æ•?/span>uj表示åQŒå…¶ä¸­æ»¡­‘»I¼š

åQ?/span>1åQ?img height="28" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/fff.JPG" width="214" border="0" />

åQ?/span>2åQ?img height="44" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/de.JPG" width="214" border="0" />

åQ?/span>3åQ?img height="44" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/def.JPG" width="240" border="0" />

其中˜q™ä¸ªéš¶å±žåº¦å‡½æ•?img height="23" alt="" src="http://www.aygfsteel.com/images/blogjava_net/changedi/ew.JPG" width="45" border="0" />­‘пޥ˜q?/span>1åQŒè¯´æ˜?/span>xi­‘Šå¯èƒ½å±žäº?/span>CiåQŒå之如果越接近0åQŒåˆ™è¯´æ˜Ž­‘Šä¸å¯èƒ½å±žäºŽCiã€?/span>

2. èšç±»˜q‡ç¨‹

当我们知é“èš¾cÀL˜¯ä»€ä¹ˆæ—¶åQŒæˆ‘们下一步想知é“的应该是怎么˜q›è¡Œèšç±»ã€‚这一点,教æä¸Šåšäº†è¯¦¾l†ä»‹¾l,补充一点自å·Þq†è§£ï¼š

1åQ‰ç‰¹å¾é€‰æ‹©(feature selection)åQšå°±åƒå…¶ä»–分¾cÖM“QåŠ¡ä¸€æ øP¼Œç‰¹å¾å¾€å¾€æ˜¯ä¸€åˆ‡æ´»åŠ¨çš„åŸºç¡€åQŒå¦‚何选å–ç‰¹å¾æ¥å°½å¯èƒ½çš„表è¾ùNœ€è¦åˆ†¾cÈš„ä¿¡æ¯æ˜¯ä¸€ä¸ªé‡è¦é—®é¢˜ã€‚表达性强的特å¾å°†å¾ˆåª„å“èš¾cÀL•ˆæžœã€‚这点在以åŽçš„实验中我会展示ã€?/span>

2åQ‰è¿‘é‚ÀLµ‹åº?/span>(proximity measure)åQšå½“选定了实例å‘é‡çš„特å¾è¡¨è¾¾åŽï¼Œå¦‚何判断两个实例å‘é‡ç›æ€¼¼å‘¢ï¼Ÿ˜q™ä¸ªé—®é¢˜æ˜¯éžå¸¸å…³é”®çš„一个问题,在蚾c»è¿‡½E‹ä¸­ä¹Ÿæœ‰ç€å†›_®šæ€§çš„æ„ä¹‰åQŒå› ä¸ø™š¾cÀLœ¬è´¨åœ¨åŒºåˆ†ç›æ€¼¼ä¸Žä¸ç›æ€¼¼åQŒè€Œè¿‘é‚ÀLµ‹åº¦å°±æ˜¯å¯¹˜q™ç§ç›æ€¼¼æ€§çš„一¿U定义ã€?/span>

3åQ‰èš¾cÕd‡†åˆ?/span>(clustering criterion)åQšå®šä¹‰äº†ç›æ€¼¼æ€§è¿˜ä¸å¤ŸåQŒç»“åˆè¿‘é‚ÀLµ‹åº¦ï¼Œå¦‚ä½•åˆ¤æ–­ç›æ€¼¼æ‰æ˜¯å…³é”®ã€‚ç›´è§‚ç†è§£èš¾cÕd‡†åˆ™è¿™ä¸ªæ¦‚念就是何时蚾c»ï¼Œä½•æ—¶ä¸èš¾cÈš„èšç±»æ¡äšg。当我们使用èšç±»½Ž—法˜q›è¡Œè®¡ç®—æ—Óž¼Œå¦‚何èšç±»æ˜¯ç®—法关心的åQŒè€Œèšä¸Žå¦éœ€è¦ä¸€ä¸ªæ ‡å‡†ï¼Œèšç±»å‡†åˆ™ž®±æ˜¯˜q™ä¸ªæ ‡å‡†ã€‚(è¯è¯´æ ‡å‡†˜q™ä¸œè¥¿ä¸€æ‹¿å‡ºæ¥ï¼Œå¤Ÿå“äºÞZº†å?/span>^_^åQ?/span>

4åQ‰èš¾cÈ®—æ³?/span>(clustering algorithm)åQšè¿™ä¸ªä¸œè¥¿ä¸ç”¨ç»†è¯´äº†å§ï¼Œæ•´ä¸ªå­¦ä¹ çš„é‡ä¸­ä¹‹é‡ï¼Œæ ¸å¿ƒçš„东西这里ä¸è®ÔŒ¼Œä»¥åŽä¼šç»†è¯ß_¼Œ½Ž€å•开个头——利用近é‚ÀLµ‹åº¦å’Œèšç±»å‡†åˆ™å¼€å§‹èš¾cÈš„˜q‡ç¨‹ã€?/span>

5åQ‰ç»“果验è¯?/span>(validation of the results)åQšå…¶å®žå¯¹äº?/span>PR的作者æå‡ø™¿™ä¸ªè¿‡½E‹ä¹Ÿæ”‘Öˆ°èšç±»ä»ÕdŠ¡‹¹ç¨‹ä¸­ï¼Œæˆ‘è§‰å¾—æœ‰ç‚¹å†—ä½™ï¼Œå› äØ“å¯¹äºŽéªŒè¯½Ž—æ³•çš„æ­£¼‹®æ€§è¿™äº‹åº”该放到算法层é¢å§åQŒå¯ä»¥æŠŠ4åQ‰å’Œ5åQ‰ç»“åˆè‡³ä¸€å±‚。因为算法正¼‹®å’Œæœ‰ç©·çš„éªŒè¯æœ¬íw«å°±æ˜¯ç®—法的ç‰ÒŽ€§å˜›ã€‚(è°è®¾è®¡äº†ä¸€ä¸ªç®—法ä¸å¾—è¯æ˜Žå•ŠåQ?/span>

6åQ?/span>(interpretation of the results)åQšä¸­æ–‡ç‰ˆçš?/span>PRä¸Šç¿»è¯‘äØ“¾l“果判定åQŒè€Œæˆ‘æ„Ÿè§‰å­—é¢æ„æ€å°±æ˜¯ç»“果解释。(èšç±»æœ€¾lˆä¼šž®†æ•°æ®é›†åˆ†æˆè‹¥å¹²ä¸ªç±»åQŒåšäº‹å‰è¦æœ‰åŽŸåˆ™åQŒåšäº‹åŽè¦æœ‰è§£é‡ŠåQŒè¿™ä¸ªå°±æ˜¯è§£é‡Šäº†ã€‚自圆其说å¯èƒ½æ˜¯æ¯”较好的äº?/span>^_^åQ?/span>

整个èšç±»ä»ÕdŠ¡è¯¦ç»†çš„ä¸œè¥¿ä¼šåœ¨ä»¥åŽè¯¦¾l†ä»‹¾l,˜q™é‡Œå…ˆç»†è¯´ä¸€ä¸‹èš¾cÕd‡†åˆ™ï¼ˆè™½ç„¶æˆ‘æ„Ÿè§‰åœ¨ä¸Šé¢æˆ‘说的已¾l够¾l†äº†åQ‰ã€‚ä‹D例å§åQŒæ¯”如,有这样一个数æ®é›†XåQŒåŒ…å«äº†å››ååŒå­¦çš„基本信æ¯å’Œæ•°å­¦æˆç‡Wã€?/span>

å§“å

òq´çñ”

ç­çñ”

æ•°å­¦æˆç‡W

张三

1

2

99

æŽå››

2

2

95

张飞

3

1

59

赵云

2

1

90

èšç±»å‡†åˆ™ž®±æ˜¯ä¸€ä¸ªåˆ†¾cÀL ‡å‡†ï¼Œå¯¹äºŽ½CÞZ¾‹ä¸­è¿™æ ·ä¸€ä¸ªæ•°æ®é›†åˆï¼Œå¦‚何èšç±»å‘¢ã€‚当然蚾cÈš„å¯èƒ½æƒ…况有很多。比如,如果我们按照òq´çñ”是å¦ä¸ºå¤§äº?/span>1æ¥åˆ†¾c»ï¼Œé‚£ä¹ˆæ•°æ®é›?/span>Xåˆ†äØ“ä¸¤ç±»åQ?/span>{张三}åQ?/span>{æŽå››åQŒå¼ é£žï¼Œèµµäº‘}åQ›å¦‚果按照签U§ä¸åŒæ¥åˆ†ï¼Œåˆ†äؓ两类åQ?/span>{张三åQŒæŽå›?/span>}åQ?/span>{张飞åQŒè™näº?/span>}åQ›å¦‚果按照戾l©æ˜¯å¦åŠæ ¼æ¥åˆ†ï¼ˆå‡è®¾åŠæ ¼ä¸?/span>60分)åQŒåˆ†ä¸¤ç±»åQ?/span>{张三åQŒæŽå››ï¼Œèµµäº‘}åQ?/span>{张飞}。当然蚾cÕd‡†åˆ™çš„è®¾è®¡å¾€å¾€æ˜¯å¤æ‚çš„åQŒå°±çœ‹ä½ æƒÏx€Žä¹ˆåˆ’åˆ†äº†ã€‚æŒ‰ç…§å¯¹åˆ†ç±»æ€æƒ³çš„几何ç†è§£ï¼Œæ•°æ®é›†ç›¸å½“于æ ähœ¬½Iºé—´åQŒæ•°æ®å®žä¾‹çš„ç‰¹å¾æ•ŽÍ¼ˆæœ¬ä¾‹å…±æœ‰4个特å¾?/span>[å§“ååQŒå¹´¾U§ï¼Œç­çñ”åQŒæ•°å­¦æˆ¾l?/span>]åQ‰ç›¸å½“于½Iºé—´¾l´åº¦åQŒè€Œå®žä¾‹å‘é‡å¯¹åº”到½Iºé—´ä¸­çš„一个点。那么蚾cÕd‡†åˆ™å°±åº”该是那些神奇的­‘…åã^é¢ï¼ˆå¯¹åº”有数学函数表辑ּåQŒæˆ‘个ähè®¤äØ“˜q™äº›å‡½æ•°ž®Þq­‰åŒäºŽèšç±»å‡†åˆ™åQ‰ï¼Œ˜q™äº›­‘…åã^é¢å°†æ•°æ®“完美çš?#8221;分离开了ã€?/span>

3. èšç±»ç‰¹å¾¾cÕdž‹

èšç±»æ—¶ç”¨åˆ°çš„特å¾å¦‚ä½•åŒºåˆ†å‘¢ï¼Œæœ‰ä»€ä¹ˆç±»åž‹è¦æ±‚?èšç±»çš„ç‰¹å¾æŒ‰ç…§åŸŸåˆ’分åQŒå¯ä»¥åˆ†ä¸ø™¿ž¾l­çš„特å¾å’Œç¦»æ•£ç‰¹å¾ã€‚其中连¾l­ç‰¹å¾å¯¹åº”的定义域是数殽Iºé—´R的连¾l­å­½Iºé—´åQŒè€Œç¦»æ•£ç‰¹å¾å¯¹åº”的是离散å­é›†ï¼Œå¦å¤–如果¼›ÀL•£ç‰¹å¾åªåŒ…å«ä¸¤ä¸ªç‰¹å¾å€û|¼Œé‚£ä¹ˆ˜q™ä¸ª¼›ÀL•£ç‰¹å¾åˆå«äºŒå€¼ç‰¹å¾ã€?/span>

       æ ÒŽ®ç‰¹å¾å–值的相对æ„义åˆå¯ä»¥å°†ç‰¹å¾åˆ†äؓ以下四ç§åQšæ ‡é‡çš„(Nominal)åQŒé¡ºåºçš„(Ordinal)åQŒåŒºé—´å°ºåº¦çš„(Interval-scaled)ä»¥åŠæ¯”率ž®ºåº¦çš?/span>(Ratio-scaled)。其中,标é‡ç‰¹å¾ç”¨äºŽ¾~–ç ä¸€¾cȉ¹å¾çš„å¯èƒ½çжæ€ï¼Œæ¯”如人的性别åQŒç¼–ç äؓ男和奻I¼›å¤©æ°”状况¾~–ç ä¸ºé˜´ã€æ™´å’Œé›¨½{‰ã€‚顺åºç‰¹å¾åŒæ ‡é‡ç‰¹å¾¾cÖM¼¼åQŒåŒæ äh˜¯ä¸€¾pÕdˆ—状æ€çš„¾~–ç åQŒåªæ˜¯å¯¹˜q™äº›¾~–ç ½E加¾U¦æŸåQŒå³¾~–ç ™åºåºæ˜¯æœ‰æ„义的,比如对一é“èœåQŒå®ƒçš„ç‰¹å¾æœ‰{很难åƒï¼Œéš‘ÖƒåQŒä¸€èˆ¬ï¼Œå¥½åƒåQŒç¾Žå‘?/span>}几个值æ¥å®šä¹‰çжæ€ï¼Œä½†æ˜¯˜q™äº›çŠ¶æ€æ˜¯æœ‰é¡ºåºæ„义的。这¾cȉ¹å¾æˆ‘è®¤äØ“ž®±æ˜¯æ ‡é‡ç‰¹å¾çš„一个特定å­é›†ï¼Œæˆ–者是一个加¾U¦æŸçš„æ ‡é‡ç‰¹å¾ã€‚区间尺度特å¾è¡¨½Cø™¯¥ç‰¹å¾æ•°å€ég¹‹é—´çš„区间有æ„义而数值的比率无æ„义,¾l典例孞®±æ˜¯æ¸©åº¦åQ?/span>A地的温度åQ?/span>20℃)æ¯?/span>B圎ͼˆ15℃)é«?/span>5度,˜q™é‡Œçš„区间差值是有æ„义的åQŒä½†ä½ ä¸èƒ½è¯´A地比B地热1/3åQŒè¿™æ˜¯æ— æ„义的。比率特å¾ä¸Žæ­¤ç›¸å,其比率是有æ„义的åQŒç»å…怾‹å­æ˜¯é‡é‡åQ?/span>Cé‡?/span>100gåQ?/span>Dé‡?/span>50gåQŒé‚£ä¹?/span>Cæ¯?/span>Dé‡?/span>2å€ï¼Œ˜q™æ˜¯æœ‰æ„义的。(当然è¯?/span>Cæ¯?/span>Dé‡?/span>50g也是å¯ä»¥çš„,因此å¯ä»¥è®¤äؓ区间ž®ºåº¦æ˜¯æ¯”率尺度的一个真å­é›†åQ‰ã€?/span>

       在常è§åº”用中åQŒåŒ…括我们åã^日关心的¾~–程实现中,一般åªå®šä¹‰nominal特å¾å’?/span>numeric特å¾åQŒå…¶ä¸?/span>nominalå¯ä»¥ç”?/span>stringæ¥è¡¨½Cºï¼Œè€?/span>numericå¯ä»¥ç”?/span>numberæ¥è¡¨½Cºã€‚(weka中的attribute的特å¾ç±»åž‹å°±æ˜¯è¿™ä¹ˆå®šä¹‰çš„åQ?/span>

4. èšç±»åˆ†æžçš„应ç”?/span>

       说了˜q™ä¹ˆå¤šåŸºæœ¬æ¦‚念,最实际的è¯é¢˜èŽ«˜q‡äºŽåº”用了。就åƒäØ“èšç±»åšå¹¿å‘Šä¸€æ øP¼Œåˆ°åº•我们å¯ä»¥åœ¨å“ªé‡Œåº”用它呢。就åƒå¼•­a€é‡Œæˆ‘æåˆ°çš„ä¼ è¯´ä¸€æ øP¼Œåˆ†ç±»ä½œäؓ人类识别对象的一个基本活动大概与人类的æ„识共åŒå­˜åœ¨ç€åQŒä¹Ÿå¯ä»¥è¯´äh¾cÀL™ºèƒ½è®¤è¯†çš„æœ¬è´¨‹zÕdЍ之䏀ž®±æ˜¯åˆ†ç±»ã€‚而研½I¶è€…对分类的研½I¶åˆž®†åˆ†¾cÕdˆ’åˆ†äØ“æœ‰ç›‘ç£ä¸Žæ— ç›‘ç£ï¼Œå…¶ä¸­èšç±»ž®±æ˜¯æ— ç›‘ç£åˆ†¾cÈš„最常用æ–ÒŽ³•也是¾l对代表性方法。设想一下,对于一¾l„æ•°æ®ï¼Œæˆ–者一堆信æ¯ï¼Œè®¡ç®—机å¯ä»¥è‡ªåŠ¨åœ°ž®†å…¶åˆ†äؓ若干¾c»ï¼Œé‚£è¿™å¯¹äºŽè¾…åŠ©äººç±»æ™ø™ƒ½æ¥è¯´¾l对是必è¦çš„也是有æ„义的。所以蚾cÈš„ä¸€ä¸ªæ ¸å¿ƒåº”ç”¨å°±æ˜¯æ•°æ®æŒ–掘与模å¼è¯†åˆ«ã€‚å¦å¤–å„个科学领域åªè¦æ¶‰åŠåˆ°åˆ†ç±»çš„ä“Q务,大家无ä¸è”想到蚾c?/span>~~~åQˆè¯è¯´æˆ‘½W¬ä¸€‹Æ¡æ­£å¼åœ°è§£é™¤èšç±»åQŒè¿˜æ˜¯åœ¨23教学楼å¬ä¸€ä¸ªè²Œä¼¼æ˜¯è‡ªåŠ¨åŒ–çš„æ•™æŽˆè®²çš„ä¿¡æ¯åŒ–课½E‹ï¼‰ã€‚而学者比较æƒå¨çš„分类ž®†èš¾cÈš„åº”ç”¨åˆ†äØ“å››ä¸ªåŸºæœ¬çš„æ–¹å‘:1åQ‰æ•°æ®åŽ»å†—ï¼Œå›_°†‹¹·é‡æ•°æ®ä¸­çš„冗余信æ¯å޻除ã€?/span>2åQ‰å‡è¯´ç”Ÿæˆï¼Œä¸ÞZº†æŽ¨å¯¼å‡ºæ•°æ®çš„æŸäº›æ€§è´¨åQŒæˆ‘们å¯ä»¥å¯¹æ•°æ®˜q›è¡Œèšç±»åˆ†æžã€?/span>3åQ‰å‡è¯´æ£€éªŒï¼Œå…¶å®žž®±æ˜¯é€šè¿‡èšç±»åˆ†æžæ¥éªŒè¯æŸä¸ªå†³½{–的风险½E‹åº¦ã€?/span>4åQ‰åŸºäºŽåˆ†¾l„的预测åQŒåŒæ‰€æœ‰é¢„‹¹‹ä“QåŠ¡ä¸€æ øP¼Œž®†å·²æœ‰çš„æ•°æ®éƒ½èš¾cÕdˆ†¾cÕdŽåQŒæ–°çš„æœªæ¥æ•°æ®å¯ä»¥ç”¨åŒæ ·çš„规则进行识别预‹¹‹å…¶æ‰€å±žåˆ†¾c…R€?/span>

       èšç±»çš„应用éžå¸¸å¹¿æ³›ï¼Œå¦‚果按科目枚举,我是懒得¾|—列了。åªè¦çŸ¥é“了其原ç†å’Œç›®æ ‡åQŒå…¶åº”用领域也就自然ç†è§£äº†ã€?/span>

5. ž®ç»“

èšç±»çš„基本概念就是这么些了,关于èšç±»çš„学习和研究已ç»åކç»å‡ åòqß_¼Œå¯ä»¥åº†å¹¸çš„一ç‚ÒŽ˜¯˜q™é‡Œçš„学习我们å¯ä»¥ç«™åœ¨å¾ˆå¤šå·¨äººçš„肩膀上,而如何去改进创新扩展应用åQŒé‚£ž®±æ˜¯æˆ‘们未æ¥çš„目的,“工欲善其事,必先利其å™?#8221;åQŒè¿™é‡Œèš¾cÕd°±æ˜¯æˆ‘们的“å™?#8221;了ã€?/span>

6. å‚è€ƒæ–‡çŒ®åŠæŽ¨è阅读

[1]Pattern Recognition Third Edition, Sergios Theodoridis, Konstantinos Koutroumbas

[2] http://baike.baidu.com/view/903740.htm?fr=ala0_1_1

[3] http://zh.wikipedia.org/zh-cn/%E6%95%B0%E6%8D%AE%E8%81%9A%E7%B1%BB

[4]æ•°æ®æŒ–掘概念与技æœ?/span>(Data mining concepts and techniques) Jiawei Han, Micheline Kamberè‘?/span>范明, å­Ÿå°å³°è¯‘

[5]模å¼è¯†åˆ«½W¬ä¸‰ç‰?/span>, Sergios Theodoridis, Konstantinos Koutroumbasè‘?/span>, æŽæ™¶çš?/span>, 王爱ä¾?/span>, 张广æºç­‰è¯?/span>

[6]æ•°æ®æŒ–æŽ˜å¯ÆD®º(Introduction to data mining) Pang-Ning Tan, Michael Steinbach, Vipin Kumarè‘?/span>范明, 范å®å»?/span>½{‰è¯‘

[7]æ•°æ®æŒ–掘实用机器学习技æœ?/span> (Data mining practical machine learning tools and techniques) Ian H.Witten, Eibe Frankè‘?/span>董糽{‰è¯‘



文章转è²è¯äh ‡æ˜Ž~~~



]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÎäÊ¤ÏØ| ÏʳÇ| µÀÕæ| ¾¸ÓîÏØ| ãôºéÏØ| Äþ¹úÊÐ| Ä«ÓñÏØ| вýÏØ| ÓÑÒêÏØ| »¨Ô«ÏØ| »áÄþÏØ| á·É½ÏØ| Î÷Ï¿ÏØ| ×ϽðÏØ| ³ç×óÊÐ| ÔÆÁúÏØ| ²ýÆ½Çø| ºÍÆ½Çø| ÁÙÏÄÏØ| ÎàÖÝÊÐ| ÔÆÃÎÏØ| ÍòÔ´ÊÐ| äÀ´¨ÏØ| ÃöÇåÏØ| ͨµÀ| ³µéÏØ| ƽºÍÏØ| IJ¶¨ÏØ| ³»ÖÝÊÐ| ÕÄÆ½ÊÐ| Èʲ¼ÏØ| ¾¸°²ÏØ| Æû³µ| ÒËÕÂÏØ| ÇØ»ÊµºÊÐ| °ö²ºÊÐ| ·áÔ­ÊÐ| º£ÑÎÏØ| Ò˶¼ÊÐ| ÍòÖÝÇø| ÁÙä¬ÏØ|