K鏈€杩戦偦锛圞-Nearest Neighbors锛孠NN锛夋槸涓€绉嶅熀鏈殑鏈哄櫒瀛︿範绠楁硶锛屽睘浜庣洃鐫e涔犱腑鐨勪竴绉嶅垎绫诲拰鍥炲綊鏂规硶銆侹NN鐨勬牳蹇冩€濇兂鏄€氳繃娴嬮噺涓嶅悓鏁版嵁鐐逛箣闂寸殑璺濈鏉ヨ繘琛屽垎绫绘垨鍥炲綊銆傚畠鐨勫熀鏈師鐞嗘槸锛氬鏋滀竴涓牱鏈湪鐗瑰緛绌洪棿涓殑k涓渶鐩搁偦鐨勬牱鏈腑鐨勫ぇ澶氭暟灞炰簬鏌愪竴涓被鍒紝鍒欒鏍锋湰涔熷睘浜庤繖涓被鍒紝鍗抽噰鐢ㄥ鏁拌〃鍐崇殑鏂瑰紡杩涜鍒嗙被銆?/p>
浠€涔堟槸KNN
K鏈€杩戦偦(KNN) 鏄竴绉嶉潪甯哥畝鍗曠殑绠楁硶锛屽叾涓瘡涓娴嬪€奸兘鏄牴鎹叾涓庡叾浠栬娴嬪€肩殑鈥滅浉浼兼€р€濇潵棰勬祴鐨勩€侹NN 鏄竴绉嶅熀浜庤蹇嗙殑绠楁硶锛屼笉鑳界敤灏侀棴褰㈠紡鐨勬ā鍨嬫潵姒傛嫭銆傝繖鎰忓懗鐫€鍦ㄨ繍琛屾椂闇€瑕佽缁冩牱鏈紝骞朵笖鐩存帴鏍规嵁鏍锋湰鍏崇郴杩涜棰勬祴銆傚洜姝わ紝KNN 涔熻绉颁负鎯版€у涔犲櫒銆?/p>
KNN绠楁硶璇嗗埆k 鈥滅浉浼尖€濇垨鏈€鎺ヨ繎琚娴嬬殑鏂拌褰曠殑瑙傚療缁撴灉锛岀劧鍚庝娇鐢ㄨ繖浜涜瀵熺粨鏋滅殑骞冲潎鍝嶅簲鍊硷紙鍥炲綊锛夋垨鏈€甯歌鐨勭被鍒紙鍒嗙被锛塳瑙傚療缁撴灉浣滀负棰勬祴杈撳嚭銆?/p>
濡備綍瀹氫箟璺濈
涓轰簡纭畾鍝簺鏁版嵁鐐规渶鎺ヨ繎缁欏畾鐨勬煡璇㈢偣锛岄渶瑕佽绠楁煡璇㈢偣涓庡叾浠栨暟鎹偣涔嬮棿鐨勮窛绂汇€傝繖浜涜窛绂诲害閲忔湁鍔╀簬褰㈡垚鍐崇瓥杈圭晫锛屽皢鏌ヨ鐐瑰垝鍒嗗埌涓嶅悓鐨勫尯鍩熴€?/p>
娆ф皬璺濈锛坧=2锛夛細杩欐槸鏈€甯哥敤鐨勮窛绂诲害閲忥紝浠呴檺浜庡疄鍊煎悜閲忋€備娇鐢ㄤ笅闈㈢殑鍏紡锛屽畠娴嬮噺鏌ヨ鐐瑰拰鍙︿竴涓娴嬮噺鐐逛箣闂寸殑鐩寸嚎銆?br>
Manhattan distance (p=1)锛?/strong>杩欎篃鏄彟涓€绉嶆祦琛岀殑璺濈搴﹂噺锛屽畠琛¢噺涓ょ偣涔嬮棿鐨勭粷瀵瑰€笺€傚畠涔熻绉颁负鍑虹杞﹁窛绂绘垨鍩庡競琛楀尯璺濈锛屽洜涓哄畠閫氬父鐢ㄧ綉鏍煎彲瑙嗗寲锛岃鏄庝汉浠浣曢€氳繃鍩庡競琛楅亾浠庝竴涓湴鍧€瀵艰埅鍒板彟涓€涓湴鍧€銆?/p>
闂靛彲澶柉鍩鸿窛绂伙細杩欑璺濈搴﹂噺鏄鍑犻噷寰峰拰鏇煎搱椤胯窛绂诲害閲忕殑涓€鑸舰寮忋€備笅闈㈠叕寮忎腑鐨勫弬鏁皃 鍏佽鍒涘缓鍏朵粬璺濈搴﹂噺銆傚綋p绛変簬2鏃舵鍑犻噷寰楄窛绂荤敤杩欎釜鍏紡琛ㄧず锛屾浖鍝堥】璺濈鐢╬绛変簬1琛ㄧず銆?/p>
姹夋槑璺濈锛圚amming Distance锛夛細鏄敤鏉ヨ 閲忎袱涓瓑闀垮瓧绗︿覆鍦ㄥ搴斾綅缃笂涓嶅悓瀛楃鐨勪釜鏁般€傚浜庝袱涓瓑闀跨殑瀛楃涓睞鍜孊锛屾眽鏄庤窛绂绘槸灏咥涓殑姣忎釜瀛楃涓嶣涓殑瀵瑰簲浣嶇疆鐨勫瓧绗﹁繘琛屾瘮杈冿紝缁熻涓嶅悓瀛楃鐨勬暟閲忋€?/p>
鎴戜滑浣跨敤璺濈锛堟垨鐩稿紓鎬э級搴﹂噺鏉ヨ绠楄瀵熷€间箣闂寸殑鐩稿宸紓銆傛渶甯歌鐨勮窛绂诲害閲忔槸娆у嚑閲屽痉鍜屾浖鍝堥】璺濈搴﹂噺銆?/p>
鍦ㄥ簲鐢╧nn绠楁硶杩涜寤烘ā鍓嶏紝蹇呴』瑕佸仛鐨勪竴浠朵簨灏辨槸鐗瑰緛鏍囧噯鍖栥€傚洜涓簁nn渚濊禆浜庤窛绂荤殑璁$畻锛岀幇瀹炴暟鎹腑锛屽悇涓壒寰佺殑鏍囧害涓€鑸槸涓嶄竴鏍风殑锛屽嵆鏁版嵁鑼冨洿鏈夊樊寮傦紝鍋囧鏌愪釜鐗瑰緛鐨勬暟鍊肩壒鍒ぇ锛岄偅涔堣窛绂荤殑搴﹂噺灏变細寮虹儓鍦拌杩欎釜杈冨ぇ鏁板€肩殑鐗瑰緛鎵€鏀厤锛屽叾浠栫壒寰佽捣鍒扮殑浣滅敤灏卞緢灏忎簡锛屾ā鍨嬩篃灏卞け鍘讳簡鎰忎箟銆傚鐗瑰緛鏍囧噯鍖栨湁澶氱鏂规硶锛屽父瑙佺殑鏈塵in-max鏍囧噯鍖栵紝z-score鏍囧噯鍖栫瓑銆?/p>
X涓虹壒寰佸悜閲忥紝Xnew涓簃in-max鏍囧噯鍖栧悗鐨勭壒寰佸悜閲忋€俶in-max鏍囧噯鍖栧悗鐨勬暟鍊艰寖鍥翠负[0,1] 饾泹琛ㄧず鐗瑰緛鍚戦噺X鐨勫钩鍧囧€? 饾洈琛ㄧず鐗瑰緛鍚戦噺X鐨勬爣鍑嗗樊銆倆-score鏍囧噯鍖栧悗鐨勬暟鍊艰寖鍥存槸鏃犵晫鐨?鈭掆垶,鈭? 鍦ㄥ簲鐢╧nn杩涜寤烘ā鏃讹紝鏈変竴涓墠鎻愬氨鏄缁冩暟鎹殑鐗瑰緛蹇呴』閮芥槸鏁板€煎瀷鐨勩€傚亣濡傛鏃惰缁冩暟鎹腑鏈夊悕涔夌壒寰侊紙绫诲埆鍊硷級 KNN 绠楁硶涓殑k 鍊煎畾涔変簡灏嗘鏌ュ灏戜釜閭诲眳浠ョ‘瀹氱壒瀹氭煡璇㈢偣鐨勫垎绫汇€備緥濡傦紝濡傛灉k=1锛屽垯瀹炰緥灏嗚鍒嗛厤鍒颁笌鍏舵渶杩戠殑閭诲眳鐩稿悓鐨勭被銆傚畾涔塳 鍙兘鏄竴绉嶅钩琛¤涓猴紝鍥犱负涓嶅悓鐨勫€煎彲鑳戒細瀵艰嚧杩囧害鎷熷悎鎴栨瑺鎷熷悎銆傝緝浣庣殑k 鍊煎彲鑳藉叿鏈夐珮鏂瑰樊锛屼絾浣庡亸宸紝鑰岃緝澶х殑k 鍊煎彲鑳藉鑷撮珮鍋忓樊鍜岃緝浣庣殑鏂瑰樊銆?/p>
鍩轰簬澧炲己鍥炲綊鏍戝拰k-鏈€杩戦偦鐨勫弽鎺ㄦ柟娉曞畾閲忓湴涓嬫按鐐规簮鍜岄潪鐐规簮纭濋吀鐩愭薄鏌撶殑褰卞搷
鐗瑰緛鐨勬爣鍑嗗寲
min-max鏍囧噯鍖?/h3>
z-score鏍囧噯鍖?/h3>
鍝戝彉閲忕紪鐮?/h3>
閫夋嫨kNN
搴旂敤
缁撹锛?/strong>KNN妯″瀷浼拌鍒嗗埆涓?4 涓紙224.6 km2锛夊拰12%锛?16.6 Sari-Neka 鍚按灞傜殑km2) 鍒嗗埆鏄閰哥洂姹℃煋鐨勯珮鍜岄潪甯搁珮涓ょ被鐨勮剢寮卞尯銆?
鏈夐渶瑕佸涔犳満鍣ㄥ涔犵殑鏈嬪弸娆㈣繋浜ゆ祦