甯歌闈㈣瘯绠楁硶锛氭湸绱犺礉鍙舵柉
Posted 鏈哄櫒瀛︿範AI绠楁硶宸ョ▼
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了甯歌闈㈣瘯绠楁硶锛氭湸绱犺礉鍙舵柉相关的知识,希望对你有一定的参考价值。
鍚慉I杞瀷鐨勭▼搴忓憳閮藉叧娉ㄤ簡杩欎釜鍙?/span>馃憞馃憞馃憞
鏈寸礌璐濆彾鏂?姒傝堪
璐濆彾鏂垎绫绘槸涓€绫诲垎绫荤畻娉曠殑鎬荤О锛岃繖绫荤畻娉曞潎浠ヨ礉鍙舵柉瀹氱悊涓哄熀纭€锛屾晠缁熺О涓鸿礉鍙舵柉鍒嗙被銆傛湰绔犻鍏堜粙缁嶈礉鍙舵柉鍒嗙被绠楁硶鐨勫熀纭€鈥斺€旇礉鍙舵柉瀹氱悊銆傛渶鍚庯紝鎴戜滑閫氳繃瀹炰緥鏉ヨ璁鸿礉鍙舵柉鍒嗙被鐨勪腑鏈€绠€鍗曠殑涓€绉? 鏈寸礌璐濆彾鏂垎绫汇€?/code>
璐濆彾鏂悊璁?& 鏉′欢姒傜巼
璐濆彾鏂悊璁?/h3>
鎴戜滑鐜板湪鏈変竴涓暟鎹泦锛屽畠鐢变袱绫绘暟鎹粍鎴愶紝鏁版嵁鍒嗗竷濡備笅鍥炬墍绀猴細
鎴戜滑鐜板湪鐢?p1(x,y) 琛ㄧず鏁版嵁鐐?(x,y) 灞炰簬绫诲埆 1锛堝浘涓敤鍦嗙偣琛ㄧず鐨勭被鍒級鐨勬鐜囷紝鐢?p2(x,y) 琛ㄧず鏁版嵁鐐?(x,y) 灞炰簬绫诲埆 2锛堝浘涓笁瑙掑舰琛ㄧず鐨勭被鍒級鐨勬鐜囷紝閭d箞瀵逛簬涓€涓柊鏁版嵁鐐?(x,y)锛屽彲浠ョ敤涓嬮潰鐨勮鍒欐潵鍒ゆ柇瀹冪殑绫诲埆锛?/p>
濡傛灉 p1(x,y) > p2(x,y) 锛岄偅涔堢被鍒负1
濡傛灉 p2(x,y) > p1(x,y) 锛岄偅涔堢被鍒负2
涔熷氨鏄锛屾垜浠細閫夋嫨楂樻鐜囧搴旂殑绫诲埆銆傝繖灏辨槸璐濆彾鏂喅绛栫悊璁虹殑鏍稿績鎬濇兂锛屽嵆閫夋嫨鍏锋湁鏈€楂樻鐜囩殑鍐崇瓥銆?/p>
鏉′欢姒傜巼
濡傛灉浣犲 p(x,y|c1) 绗﹀彿寰堢啛鎮夛紝閭d箞鍙互璺宠繃鏈皬鑺傘€?/p>
鏈変竴涓浜?7 鍧楃煶澶寸殑缃愬瓙锛屽叾涓?3 鍧楁槸鐧借壊鐨勶紝4 鍧楁槸榛戣壊鐨勩€傚鏋滀粠缃愬瓙涓殢鏈哄彇鍑轰竴鍧楃煶澶达紝閭d箞鏄櫧鑹茬煶澶寸殑鍙兘鎬ф槸澶氬皯锛熺敱浜庡彇鐭冲ご鏈?7 绉嶅彲鑳斤紝鍏朵腑 3 绉嶄负鐧借壊锛屾墍浠ュ彇鍑虹櫧鑹茬煶澶寸殑姒傜巼涓?3/7 銆傞偅涔堝彇鍒伴粦鑹茬煶澶寸殑姒傜巼鍙堟槸澶氬皯鍛紵寰堟樉鐒讹紝鏄?4/7 銆傛垜浠娇鐢?P(white) 鏉ヨ〃绀哄彇鍒扮櫧鑹茬煶澶寸殑姒傜巼锛屽叾姒傜巼鍊煎彲浠ラ€氳繃鐧借壊鐭冲ご鏁扮洰闄や互鎬荤殑鐭冲ご鏁扮洰鏉ュ緱鍒般€?/p>
濡傛灉杩?7 鍧楃煶澶村涓嬪浘鎵€绀猴紝鏀惧湪涓や釜妗朵腑锛岄偅涔堜笂杩版鐜囧簲璇ュ浣曡绠楋紵
璁$畻 P(white) 鎴栬€?P(black) 锛屽鏋滀簨鍏堟垜浠煡閬撶煶澶存墍鍦ㄦ《鐨勪俊鎭槸浼氭敼鍙樼粨鏋滅殑銆傝繖灏辨槸鎵€璋撶殑鏉′欢姒傜巼锛坈onditional probablity锛夈€傚亣瀹氳绠楃殑鏄粠 B 妗跺彇鍒扮櫧鑹茬煶澶寸殑姒傜巼锛岃繖涓鐜囧彲浠ヨ浣?P(white|bucketB) 锛屾垜浠О涔嬩负鈥滃湪宸茬煡鐭冲ご鍑鸿嚜 B 妗剁殑鏉′欢涓嬶紝鍙栧嚭鐧借壊鐭冲ご鐨勬鐜団€濄€傚緢瀹规槗寰楀埌锛孭(white|bucketA) 鍊间负 2/4 锛孭(white|bucketB) 鐨勫€间负 1/3 銆?/p>
鏉′欢姒傜巼鐨勮绠楀叕寮忓涓嬶細
P(white|bucketB) = P(white and bucketB) / P(bucketB)
棣栧厛锛屾垜浠敤 B 妗朵腑鐧借壊鐭冲ご鐨勪釜鏁伴櫎浠ヤ袱涓《涓€荤殑鐭冲ご鏁帮紝寰楀埌 P(white and bucketB) = 1/7 .鍏舵锛岀敱浜?B 妗朵腑鏈?3 鍧楃煶澶达紝鑰屾€荤煶澶存暟涓?7 锛屼簬鏄?P(bucketB) 灏辩瓑浜?3/7 銆備簬鏄張 P(white|bucketB) = P(white and bucketB) / P(bucketB) = (1/7) / (3/7) = 1/3 銆?/p>
鍙﹀涓€绉嶆湁鏁堣绠楁潯浠舵鐜囩殑鏂规硶绉颁负璐濆彾鏂噯鍒欍€傝礉鍙舵柉鍑嗗垯鍛婅瘔鎴戜滑濡備綍浜ゆ崲鏉′欢姒傜巼涓殑鏉′欢涓庣粨鏋溿€?/p>
浣跨敤鏉′欢姒傜巼鏉ュ垎绫?/h3>
涓婇潰鎴戜滑鎻愬埌璐濆彾鏂喅绛栫悊璁鸿姹傝绠椾袱涓鐜?p1(x, y) 鍜?p2(x, y):
濡傛灉 p1(x, y) > p2(x, y), 閭d箞灞炰簬绫诲埆 1;
濡傛灉 p2(x, y) > p1(X, y), 閭d箞灞炰簬绫诲埆 2.
杩欏苟涓嶆槸璐濆彾鏂喅绛栫悊璁虹殑鎵€鏈夊唴瀹广€備娇鐢?p1() 鍜?p2() 鍙槸涓轰簡灏藉彲鑳界畝鍖栨弿杩帮紝鑰岀湡姝i渶瑕佽绠楀拰姣旇緝鐨勬槸 p(c1|x, y) 鍜?p(c2|x, y) .杩欎簺绗﹀彿鎵€浠h〃鐨勫叿浣撴剰涔夋槸: 缁欏畾鏌愪釜鐢?x銆亂 琛ㄧず鐨勬暟鎹偣锛岄偅涔堣鏁版嵁鐐规潵鑷被鍒?c1 鐨勬鐜囨槸澶氬皯锛熸暟鎹偣鏉ヨ嚜绫诲埆 c2 鐨勬鐜囧張鏄灏戯紵娉ㄦ剰杩欎簺姒傜巼涓庢鐜?p(x, y|c1) 骞朵笉涓€鏍凤紝涓嶈繃鍙互浣跨敤璐濆彾鏂噯鍒欐潵浜ゆ崲姒傜巼涓潯浠朵笌缁撴灉銆傚叿浣撳湴锛屽簲鐢ㄨ礉鍙舵柉鍑嗗垯寰楀埌:
浣跨敤涓婇潰杩欎簺瀹氫箟锛屽彲浠ュ畾涔夎礉鍙舵柉鍒嗙被鍑嗗垯涓?
濡傛灉 P(c1|x, y) > P(c2|x, y), 閭d箞灞炰簬绫诲埆 c1;
濡傛灉 P(c2|x, y) > P(c1|x, y), 閭d箞灞炰簬绫诲埆 c2.
鍦ㄦ枃妗e垎绫讳腑锛屾暣涓枃妗o紙濡備竴灏佺數瀛愰偖浠讹級鏄疄渚嬶紝鑰岀數瀛愰偖浠朵腑鐨勬煇浜涘厓绱犲垯鏋勬垚鐗瑰緛銆傛垜浠彲浠ヨ瀵熸枃妗d腑鍑虹幇鐨勮瘝锛屽苟鎶婃瘡涓瘝浣滀负涓€涓壒寰侊紝鑰屾瘡涓瘝鐨勫嚭鐜版垨鑰呬笉鍑虹幇浣滀负璇ョ壒寰佺殑鍊硷紝杩欐牱寰楀埌鐨勭壒寰佹暟鐩氨浼氳窡璇嶆眹琛ㄤ腑鐨勮瘝鐨勬暟鐩竴鏍峰銆?/p>
鎴戜滑鍋囪鐗瑰緛涔嬮棿 鐩镐簰鐙珛 銆傛墍璋?鐙珛(independence) 鎸囩殑鏄粺璁℃剰涔変笂鐨勭嫭绔嬶紝鍗充竴涓壒寰佹垨鑰呭崟璇嶅嚭鐜扮殑鍙兘鎬т笌瀹冨拰鍏朵粬鍗曡瘝鐩搁偦娌℃湁鍏崇郴锛屾瘮濡傝锛屸€滄垜浠€濅腑鐨勨€滄垜鈥濆拰鈥滀滑鈥濆嚭鐜扮殑姒傜巼涓庤繖涓や釜瀛楃浉閭绘病鏈変换浣曞叧绯汇€傝繖涓亣璁炬鏄湸绱犺礉鍙舵柉鍒嗙被鍣ㄤ腑 鏈寸礌(naive) 涓€璇嶇殑鍚箟銆傛湸绱犺礉鍙舵柉鍒嗙被鍣ㄤ腑鐨勫彟涓€涓亣璁炬槸锛?span>姣忎釜鐗瑰緛鍚岀瓑閲嶈銆?/p>
Note: 鏈寸礌璐濆彾鏂垎绫诲櫒閫氬父鏈変袱绉嶅疄鐜版柟寮? 涓€绉嶅熀浜庝集鍔埄妯″瀷瀹炵幇锛屼竴绉嶅熀浜庡椤瑰紡妯″瀷瀹炵幇銆傝繖閲岄噰鐢ㄥ墠涓€绉嶅疄鐜版柟寮忋€傝瀹炵幇鏂瑰紡涓苟涓嶈€冭檻璇嶅湪鏂囨。涓嚭鐜扮殑娆℃暟锛屽彧鑰冭檻鍑轰笉鍑虹幇锛屽洜姝ゅ湪杩欎釜鎰忎箟涓婄浉褰撲簬鍋囪璇嶆槸绛夋潈閲嶇殑銆?/p>
鏈哄櫒瀛︿範鐨勪竴涓噸瑕佸簲鐢ㄥ氨鏄枃妗g殑鑷姩鍒嗙被銆?/p>
鍦ㄦ枃妗e垎绫讳腑锛屾暣涓枃妗o紙濡備竴灏佺數瀛愰偖浠讹級鏄疄渚嬶紝鑰岀數瀛愰偖浠朵腑鐨勬煇浜涘厓绱犲垯鏋勬垚鐗瑰緛銆傛垜浠彲浠ヨ瀵熸枃妗d腑鍑虹幇鐨勮瘝锛屽苟鎶婃瘡涓瘝浣滀负涓€涓壒寰侊紝鑰屾瘡涓瘝鐨勫嚭鐜版垨鑰呬笉鍑虹幇浣滀负璇ョ壒寰佺殑鍊硷紝杩欐牱寰楀埌鐨勭壒寰佹暟鐩氨浼氳窡璇嶆眹琛ㄤ腑鐨勮瘝鐨勬暟鐩竴鏍峰銆?/p>
鏈寸礌璐濆彾鏂槸涓婇潰浠嬬粛鐨勮礉鍙舵柉鍒嗙被鍣ㄧ殑涓€涓墿灞曪紝鏄敤浜庢枃妗e垎绫荤殑甯哥敤绠楁硶銆備笅闈㈡垜浠細杩涜涓€浜涙湸绱犺礉鍙舵柉鍒嗙被鐨勫疄璺甸」鐩€?/p>
鏈寸礌璐濆彾鏂?鍘熺悊 鏋勫缓涓€涓揩閫熻繃婊ゅ櫒鏉ュ睆钄藉湪绾跨ぞ鍖虹暀瑷€鏉夸笂鐨勪井杈辨€ц█璁恒€傚鏋滄煇鏉$暀瑷€浣跨敤浜嗚礋闈㈡垨鑰呬井杈辨€х殑璇█锛岄偅涔堝氨灏嗚鐣欒█鏍囪瘑涓哄唴瀹逛笉褰撱€傚姝ら棶棰樺缓绔嬩袱涓被鍒? 渚颈绫诲拰闈炰井杈辩被锛屼娇鐢?1 鍜?0 鍒嗗埆琛ㄧず銆?/p>
鏀堕泦鏁版嵁: 鍙互浣跨敤浠讳綍鏂规硶 鏈緥鏄垜浠嚜宸辨瀯閫犵殑璇嶈〃: 鍦ㄥ埄鐢ㄨ礉鍙舵柉鍒嗙被鍣ㄥ鏂囨。杩涜鍒嗙被鏃讹紝瑕佽绠楀涓鐜囩殑涔樼Н浠ヨ幏寰楁枃妗e睘浜庢煇涓被鍒殑姒傜巼锛屽嵆璁$畻 p(w0|1) * p(w1|1) * p(w2|1)銆傚鏋滃叾涓竴涓鐜囧€间负 0锛岄偅涔堟渶鍚庣殑涔樼Н涔熶负 0銆備负闄嶄綆杩欑褰卞搷锛屽彲浠ュ皢鎵€鏈夎瘝鐨勫嚭鐜版暟鍒濆鍖栦负 1锛屽苟灏嗗垎姣嶅垵濮嬪寲涓?2 锛堝彇1 鎴?2 鐨勭洰鐨勪富瑕佹槸涓轰簡淇濊瘉鍒嗗瓙鍜屽垎姣嶄笉涓?锛屽ぇ瀹跺彲浠ユ牴鎹笟鍔¢渶姹傝繘琛屾洿鏀癸級銆?/p>
鍙︿竴涓亣鍒扮殑闂鏄笅婧㈠嚭锛岃繖鏄敱浜庡お澶氬緢灏忕殑鏁扮浉涔橀€犳垚鐨勩€傚綋璁$畻涔樼Н p(w0|ci) * p(w1|ci) * p(w2|ci)... p(wn|ci) 鏃讹紝鐢变簬澶ч儴鍒嗗洜瀛愰兘闈炲父灏忥紝鎵€浠ョ▼搴忎細涓嬫孩鍑烘垨鑰呭緱鍒颁笉姝g‘鐨勭瓟妗堛€傦紙鐢?Python 灏濊瘯鐩镐箻璁稿寰堝皬鐨勬暟锛屾渶鍚庡洓鑸嶄簲鍏ュ悗浼氬緱鍒?0锛夈€備竴绉嶈В鍐冲姙娉曟槸瀵逛箻绉彇鑷劧瀵规暟銆傚湪浠f暟涓湁 ln(a * b) = ln(a) + ln(b), 浜庢槸閫氳繃姹傚鏁板彲浠ラ伩鍏嶄笅婧㈠嚭鎴栬€呮诞鐐规暟鑸嶅叆瀵艰嚧鐨勯敊璇€傚悓鏃讹紝閲囩敤鑷劧瀵规暟杩涜澶勭悊涓嶄細鏈変换浣曟崯澶便€?/p>
涓嬪浘缁欏嚭浜嗗嚱鏁?f(x) 涓?ln(f(x)) 鐨勬洸绾裤€傚彲浠ョ湅鍑猴紝瀹冧滑鍦ㄧ浉鍚屽尯鍩熷唴鍚屾椂澧炲姞鎴栬€呭噺灏戯紝骞朵笖鍦ㄧ浉鍚岀偣涓婂彇鍒版瀬鍊笺€傚畠浠殑鍙栧€艰櫧鐒朵笉鍚岋紝浣嗕笉褰卞搷鏈€缁堢粨鏋溿€?/p>
瀹屾垚鏈寸礌璐濆彾鏂殑涓€涓渶钁楀悕鐨勫簲鐢? 鐢靛瓙閭欢鍨冨溇杩囨护銆?/p>
浣跨敤鏈寸礌璐濆彾鏂鐢靛瓙閭欢杩涜鍒嗙被 鏀堕泦鏁版嵁: 鎻愪緵鏂囨湰鏂囦欢 鏂囨湰鏂囦欢鍐呭濡備笅: 骞垮憡鍟嗗線寰€鎯崇煡閬撳叧浜庝竴涓汉鐨勪竴浜涚壒瀹氫汉鍙g粺璁′俊鎭紝浠ヤ究鑳芥洿濂藉湴瀹氬悜鎺ㄩ攢骞垮憡銆?/p>
鎴戜滑灏嗗垎鍒粠缇庡浗鐨勪袱涓煄甯備腑閫夊彇涓€浜涗汉锛岄€氳繃鍒嗘瀽杩欎簺浜哄彂甯冪殑淇℃伅锛屾潵姣旇緝杩欎袱涓煄甯傜殑浜轰滑鍦ㄥ箍鍛婄敤璇嶄笂鏄惁涓嶅悓銆傚鏋滅粨璁虹‘瀹炰笉鍚岋紝閭d箞浠栦滑鍚勮嚜甯哥敤鐨勮瘝鏄摢浜涳紝浠庝汉浠殑鐢ㄨ瘝褰撲腑锛屾垜浠兘鍚﹀涓嶅悓鍩庡競鐨勪汉鎵€鍏冲績鐨勫唴瀹规湁鎵€浜嗚В銆?/p>
鏀堕泦鏁版嵁: 浠?RSS 婧愭敹闆嗗唴瀹癸紝杩欓噷闇€瑕佸 RSS 婧愭瀯寤轰竴涓帴鍙?/p>
涔熷氨鏄鍏?RSS 婧愶紝鎴戜滑浣跨敤 python 涓嬭浇鏂囨湰锛?/p>
鍦╤ttp://code.google.com/p/feedparser/ 涓嬫祻瑙堢浉鍏虫枃妗o紝瀹夎 feedparse锛岄鍏堣В鍘嬩笅杞界殑鍖咃紝骞跺皢褰撳墠鐩綍鍒囨崲鍒拌В鍘嬫枃浠舵墍鍦ㄧ殑鏂囦欢澶癸紝鐒跺悗鍦?python 鎻愮ず绗︿笅杈撳叆锛?/p>
鍑嗗鏁版嵁: 灏嗘枃鏈枃浠惰В鏋愭垚璇嶆潯鍚戦噺 鏂囨。璇嶈妯″瀷 鎴戜滑灏嗘瘡涓瘝鐨勫嚭鐜颁笌鍚︿綔涓轰竴涓壒寰侊紝杩欏彲浠ヨ鎻忚堪涓?璇嶉泦妯″瀷(set-of-words model)銆傚鏋滀竴涓瘝鍦ㄦ枃妗d腑鍑虹幇涓嶆涓€娆★紝杩欏彲鑳芥剰鍛崇潃鍖呭惈璇ヨ瘝鏄惁鍑虹幇鍦ㄦ枃妗d腑鎵€涓嶈兘琛ㄨ揪鐨勬煇绉嶄俊鎭紝杩欑鏂规硶琚О涓?璇嶈妯″瀷(bag-of-words model)銆傚湪璇嶈涓紝姣忎釜鍗曡瘝鍙互鍑虹幇澶氭锛岃€屽湪璇嶉泦涓紝姣忎釜璇嶅彧鑳藉嚭鐜颁竴娆°€備负閫傚簲璇嶈妯″瀷锛岄渶瑕佸鍑芥暟 setOfWords2Vec() 绋嶅姞淇敼锛屼慨鏀瑰悗鐨勫嚱鏁颁负 bagOfWords2Vec() 銆?/p>
濡備笅缁欏嚭浜嗗熀浜庤瘝琚嬫ā鍨嬬殑鏈寸礌璐濆彾鏂唬鐮併€傚畠涓庡嚱鏁?setOfWords2Vec() 鍑犱箮瀹屽叏鐩稿悓锛屽敮涓€涓嶅悓鐨勬槸姣忓綋閬囧埌涓€涓崟璇嶆椂锛屽畠浼氬鍔犺瘝鍚戦噺涓殑瀵瑰簲鍊硷紝鑰屼笉鍙槸灏嗗搴旂殑鏁板€艰涓?1 銆?/p>
褰撴敞閲婃帀鐢ㄤ簬绉婚櫎楂橀璇嶇殑涓夎浠g爜锛岀劧鍚庢瘮杈冩敞閲婂墠鍚庣殑鍒嗙被鎬ц兘锛屽幓鎺夎繖鍑犺浠g爜涔嬪悗锛岄敊璇巼涓?4%锛岋紝鑰屼繚鐣欒繖浜涗唬鐮佸緱鍒扮殑閿欒鐜囦负70%銆傝繖閲岃瀵熷埌锛岃繖浜涚暀瑷€涓嚭鐜版鏁版渶澶氱殑鍓?0涓瘝娑电洊浜嗘墍鏈夌敤璇嶇殑30%锛?/p>
vocabList鐨勫ぇ灏忕害涓?000涓瘝锛屼篃灏辨槸璇达紝璇嶆眹琛ㄤ腑鐨勪竴灏忛儴鍒嗗崟璇嶅嵈鍗犳嵁浜嗘墍鏈夋枃鏈敤璇嶇殑涓€澶ч儴鍒嗐€備骇鐢熻繖绉嶇幇璞$殑鍘熷洜鏄洜涓鸿瑷€涓ぇ閮ㄥ垎閮芥槸鍐椾綑鍜岀粨鏋勮緟鍔╂€у唴瀹广€傚彟涓€涓父鐢ㄧ殑鏂规硶鏄笉浠呯Щ闄ら珮棰戣瘝锛屽悓鏃朵粠鏌愪釜棰勫畾楂橀璇嶄腑绉婚櫎缁撴瀯涓婄殑杈呭姪璇嶏紝璇ヨ瘝琛ㄧО涓哄仠鐢ㄨ瘝琛ㄣ€?/p>
浠庢渶鍚庤緭鍑虹殑鍗曡瘝锛屽彲浠ョ湅鍑虹▼搴忚緭鍑轰簡澶ч噺鐨勫仠鐢ㄨ瘝锛屽彲浠ョЩ闄ゅ浐瀹氱殑鍋滅敤璇嶇湅鐪嬬粨鏋滃浣曪紝杩欐牱鍋氱殑璇濓紝鍒嗙被閿欒鐜囦篃浼氶檷浣庛€?/p>
https://github.com/apachecn/AiLearning/blob/dev/blog/ml/4.%E6%9C%B4%E7%B4%A0%E8%B4%9D%E5%8F%B6%E6%96%AF.md 闃呰杩囨湰鏂囩殑浜鸿繕鐪嬩簡浠ヤ笅锛?/strong> 涓嶆柇鏇存柊璧勬簮 娣卞害瀛︿範銆佹満鍣ㄥ涔犮€佹暟鎹垎鏋愩€乸ython 以上是关于甯歌闈㈣瘯绠楁硶锛氭湸绱犺礉鍙舵柉的主要内容,如果未能解决你的问题,请参考以下文章 銆愬崄澶╄嚜鍒惰蒋娓叉煋鍣ㄣ€慏AY 02锛氱敾涓€鏉$洿绾匡紙DDA 绠楁硶 & Bresenham鈥檚 绠楁硶锛?/a>
鏈寸礌璐濆彾鏂?鍦烘櫙
鎻愬彇鎵€鏈夋枃妗d腑鐨勮瘝鏉″苟杩涜鍘婚噸
鑾峰彇鏂囨。鐨勬墍鏈夌被鍒?璁$畻姣忎釜绫诲埆涓殑鏂囨。鏁扮洰
瀵规瘡绡囪缁冩枃妗?
瀵规瘡涓被鍒?
濡傛灉璇嶆潯鍑虹幇鍦ㄦ枃妗d腑-->澧炲姞璇ヨ瘝鏉$殑璁℃暟鍊硷紙for寰幆鎴栬€呯煩闃电浉鍔狅級
澧炲姞鎵€鏈夎瘝鏉$殑璁℃暟鍊硷紙姝ょ被鍒笅璇嶆潯鎬绘暟锛?瀵规瘡涓被鍒?
瀵规瘡涓瘝鏉?
灏嗚璇嶆潯鐨勬暟鐩櫎浠ユ€昏瘝鏉℃暟鐩緱鍒扮殑鏉′欢姒傜巼锛圥(璇嶆潯|绫诲埆)锛?杩斿洖璇ユ枃妗e睘浜庢瘡涓被鍒殑鏉′欢姒傜巼锛圥(绫诲埆|鏂囨。鐨勬墍鏈夎瘝鏉?锛?br>
鏈寸礌璐濆彾鏂?寮€鍙戞祦绋?/h3>
鏀堕泦鏁版嵁: 鍙互浣跨敤浠讳綍鏂规硶銆?鍑嗗鏁版嵁: 闇€瑕佹暟鍊煎瀷鎴栬€呭竷灏斿瀷鏁版嵁銆?鍒嗘瀽鏁版嵁: 鏈夊ぇ閲忕壒寰佹椂锛岀粯鍒剁壒寰佷綔鐢ㄤ笉澶э紝姝ゆ椂浣跨敤鐩存柟鍥炬晥鏋滄洿濂姐€?璁粌绠楁硶: 璁$畻涓嶅悓鐨勭嫭绔嬬壒寰佺殑鏉′欢姒傜巼銆?娴嬭瘯绠楁硶: 璁$畻閿欒鐜囥€?浣跨敤绠楁硶: 涓€涓父瑙佺殑鏈寸礌璐濆彾鏂簲鐢ㄦ槸鏂囨。鍒嗙被銆傚彲浠ュ湪浠绘剰鐨勫垎绫诲満鏅腑浣跨敤
鏈寸礌璐濆彾鏂垎绫诲櫒锛屼笉涓€瀹氶潪瑕佹槸鏂囨湰銆?br>
鏈寸礌璐濆彾鏂?绠楁硶鐗圭偣
浼樼偣: 鍦ㄦ暟鎹緝灏戠殑鎯呭喌涓嬩粛鐒舵湁鏁堬紝鍙互澶勭悊澶氱被鍒棶棰樸€?缂虹偣: 瀵逛簬杈撳叆鏁版嵁鐨勫噯澶囨柟寮忚緝涓烘晱鎰熴€?閫傜敤鏁版嵁绫诲瀷: 鏍囩О鍨嬫暟鎹€?/code>
鏈寸礌璐濆彾鏂?椤圭洰妗堜緥
椤圭洰妗堜緥1: 灞忚斀绀惧尯鐣欒█鏉跨殑渚颈鎬ц█璁?/h3>
椤圭洰姒傝堪
寮€鍙戞祦绋?/h4>
鏀堕泦鏁版嵁: 鍙互浣跨敤浠讳綍鏂规硶
鍑嗗鏁版嵁: 浠庢枃鏈腑鏋勫缓璇嶅悜閲?鍒嗘瀽鏁版嵁: 妫€鏌ヨ瘝鏉$‘淇濊В鏋愮殑姝g‘鎬?璁粌绠楁硶: 浠庤瘝鍚戦噺璁$畻姒傜巼
娴嬭瘯绠楁硶: 鏍规嵁鐜板疄鎯呭喌淇敼鍒嗙被鍣?浣跨敤绠楁硶: 瀵圭ぞ鍖虹暀瑷€鏉胯█璁鸿繘琛屽垎绫?/code>
椤圭洰妗堜緥2: 浣跨敤鏈寸礌璐濆彾鏂繃婊ゅ瀮鍦鹃偖浠?/h3>
椤圭洰姒傝堪
寮€鍙戞祦绋?/h4>
鏀堕泦鏁版嵁: 鎻愪緵鏂囨湰鏂囦欢
鍑嗗鏁版嵁: 灏嗘枃鏈枃浠惰В鏋愭垚璇嶆潯鍚戦噺
鍒嗘瀽鏁版嵁: 妫€鏌ヨ瘝鏉$‘淇濊В鏋愮殑姝g‘鎬?璁粌绠楁硶: 浣跨敤鎴戜滑涔嬪墠寤虹珛鐨?trainNB() 鍑芥暟
娴嬭瘯绠楁硶: 浣跨敤鏈寸礌璐濆彾鏂繘琛屼氦鍙夐獙璇?浣跨敤绠楁硶: 鏋勫缓涓€涓畬鏁寸殑绋嬪簭瀵逛竴缁勬枃妗h繘琛屽垎绫伙紝灏嗛敊鍒嗙殑鏂囨。杈撳嚭鍒板睆骞曚笂
椤圭洰妗堜緥3: 浣跨敤鏈寸礌璐濆彾鏂垎绫诲櫒浠庝釜浜哄箍鍛婁腑鑾峰彇鍖哄煙鍊惧悜
椤圭洰姒傝堪
寮€鍙戞祦绋?/h4>
鏀堕泦鏁版嵁: 浠?RSS 婧愭敹闆嗗唴瀹癸紝杩欓噷闇€瑕佸 RSS 婧愭瀯寤轰竴涓帴鍙?鍑嗗鏁版嵁: 灏嗘枃鏈枃浠惰В鏋愭垚璇嶆潯鍚戦噺
鍒嗘瀽鏁版嵁: 妫€鏌ヨ瘝鏉$‘淇濊В鏋愮殑姝g‘鎬?璁粌绠楁硶: 浣跨敤鎴戜滑涔嬪墠寤虹珛鐨?trainNB0() 鍑芥暟
娴嬭瘯绠楁硶: 瑙傚療閿欒鐜囷紝纭繚鍒嗙被鍣ㄥ彲鐢ㄣ€傚彲浠ヤ慨鏀瑰垏鍒嗙▼搴忥紝浠ラ檷浣庨敊璇巼锛屾彁楂樺垎绫荤粨鏋?浣跨敤绠楁硶: 鏋勫缓涓€涓畬鏁寸殑绋嬪簭锛屽皝瑁呮墍鏈夊唴瀹广€傜粰瀹氫袱涓?RSS 婧愶紝鏀圭▼搴忎細鏄剧ず鏈€甯哥敤鐨勫叕鍏辫瘝
>>> python setup.py install