{"id":323,"date":"2017-08-09T19:12:14","date_gmt":"2017-08-09T11:12:14","guid":{"rendered":"http:\/\/www.tastestars.com\/?p=323"},"modified":"2017-08-09T19:12:14","modified_gmt":"2017-08-09T11:12:14","slug":"2-2","status":"publish","type":"post","link":"https:\/\/tastestars.com\/index.php\/2017\/08\/09\/2-2\/","title":{"rendered":"Matlab\u7ade\u4e89\u795e\u7ecf\u7f51\u7edc-\u901a\u7528\u578b"},"content":{"rendered":"<p>1. \u7ade\u4e89\u6027\u795e\u7ecf\u7f51\u7edc\u5206\u7c7b<br \/>\n  \u25cf SOM\uff08Self&#8211;Organizing Feature Maps\uff09\u795e\u7ecf\u7f51\u7edc\u6ca1\u6709\u6570\u636e\u8f93\u51fa\uff0c\u63d0\u524d\u4e0d\u77e5\u9053\u6570\u636e\u5c5e\u4e8e\u54ea\u4e2a\u7c7b\u522b<br \/>\n  \u25cf LVQ\uff08Learning Vector Quantization Networks\uff09\u795e\u7ecf\u7f51\u7edc\u8868\u793a\u63d0\u524d\u77e5\u9053\u6570\u636e\u5c5e\u4e8e\u54ea\u4e2a\u7c7b\u522b<br \/>\n  \u25cf \u901a\u7528\u578b\u795e\u7ecf\u7f51\u7edc\uff1a\u4e0e\u4e0a\u9762\u4e24\u79cd\u7f51\u7edc\u7ed3\u6784\u4e0d\u4e00\u6837<\/p>\n<p>2. \u6570\u636e\u5206\u7c7b\u4f5c\u7528\uff1a<br \/>\n  \u25cf \u5bf9\u4e8e\u5df2\u6709\u7684\u6d77\u91cf\u6570\u636e\u6709\u66f4\u597d\u8ba4\u77e5<br \/>\n  \u25cf \u5bf9\u672a\u6765\u6240\u6536\u96c6\u7684\u6570\u636e\u8fdb\u884c\u5206\u7c7b<\/p>\n<p>3. \u901a\u7528\u578b\u7ade\u4e89\u6027\u795e\u7ecf\u7f51\u7edc<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"326\" data-permalink=\"https:\/\/tastestars.com\/index.php\/2017\/08\/09\/2-2\/%e6%88%aa%e5%9b%be-5\/\" data-orig-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-5.png\" data-orig-size=\"1120,780\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\u622a\u56fe (5)\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-5.png\" data-large-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-5.png\" src=\"http:\/\/www.tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-5.png\" alt=\"\" width=\"300\" height=\"209\" class=\"alignnone size-medium wp-image-326\" \/><br \/>\nR\u4e3a\u8f93\u5165\uff0cdist\u4e3a\u6b27\u5f0f\u8ddd\u79bb\u52a0\u6743\u51fd\u6570\uff08Euclidean distance weight function\uff09\uff0c||\u8fd9\u4e2a\u7b26\u53f7||\u53eb\u8303\u6570,\u5b83\u4e8b\u5b9e\u4e0a\u662f\u7531\u7ebf\u6027\u8d4b\u8303\u7a7a\u95f4\u5230\u975e\u8d1f\u5b9e\u6570\u7684\u6620\u5c04<br \/>\n||ndist|| \u8868\u793a\u4e3a-\u6839\u53f7(w1-r11)^2+(w2-r12)^2<br \/>\n\u518d\u52a0\u4e0a\u4e00\u4e2abias<br \/>\n\u6bcf\u4e00\u4e2a\u795e\u7ecf\u5143\u90fd\u6309\u7167\u6b64\u79cd\u65b9\u5f0f\u8ba1\u7b97<br \/>\n\u5728S\u4e2a\u8f93\u51fa\u4e2d\uff0c\u80af\u5b9a\u6709\u4e00\u4e2ayn\u6700\u5c0f\uff08\u8ddd\u79bb\u6700\u8fd1\uff09\uff0c\u90a3\u4e48yn\u8d62\u4e86<\/p>\n<p>4. \u795e\u7ecf\u7f51\u7edc\u7684\u8bad\u7ec3\u8fc7\u7a0b\u5c31\u662f\u66f4\u65b0weight\u4e0ebias\u3002<br \/>\n4.1 weight\u7684\u66f4\u65b0\u89c4\u5219<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"325\" data-permalink=\"https:\/\/tastestars.com\/index.php\/2017\/08\/09\/2-2\/%e6%88%aa%e5%9b%be-4\/\" data-orig-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-4.png\" data-orig-size=\"892,100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\u622a\u56fe (4)\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-4.png\" data-large-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-4.png\" src=\"http:\/\/www.tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-4.png\" alt=\"\" width=\"300\" height=\"34\" class=\"alignnone size-medium wp-image-325\" \/><br \/>\n\u901a\u4fd7\u6765\u8bf4\u5c31\u662f\uff1aweight\u66f4\u65b0\u540e=\u66f4\u65b0\u524d+alpha\uff08\u8f93\u5165\u503c-\u66f4\u65b0\u524d\u503c\uff09 alpha\u81ea\u5df1\u8bbe\u7f6e\uff0c\u53ef\u80fd\u662f0.5<br \/>\n\u8fd9\u6837weight\u8d8a\u6765\u8d8a\u63a5\u8fd1\u8f93\u5165\u503c\u6216\u8f93\u5165\u503c\u7684\u5747\u503c<br \/>\n4.2 bais\u7684\u66f4\u65b0\u89c4\u5219<br \/>\n\u9632\u6b62weigh\u4e00\u5f00\u59cb\u5c31\u6ca1\u9009\u62e9\u597d\uff0c\u67d0\u4e00\u4e2a\u795e\u7ecf\u5143\u6216\u51e0\u4e2a\u795e\u7ecf\u5143\u603b\u662f\u7ade\u4e89\u5931\u8d25\u4e00\u76f4\u4e0d\u66f4\u65b0\u3002\uff08dead neuron\uff09<br \/>\n\u67d0\u4e2a\u795e\u7ecf\u5143\u5728\u7ade\u4e89\u4e2d\u5f88\u5c11\u8d62\uff0c\u90a3\u4e48\u5c06bias\u503c\u53d8\u5927\uff0c\u8fd9\u6837\uff0c\u8fd9\u4e2a\u795e\u7ecf\u5143\u53ef\u80fd\u4f1a\u8d62\uff0c\u8fd9\u6837weight\u5c31\u53c8\u5f00\u59cb\u66f4\u65b0\u4e86\u3002<br \/>\n  \u25cf \u7ecf\u5e38\u8d62\u7684\u795e\u7ecf\u5143\uff0cbias\u9010\u6e10\u53d8\u5c0f\u4e00\u70b9\u3002<br \/>\n  \u25cf \u7ecf\u5e38\u8f93\u7684\u795e\u7ecf\u5143\uff0cbias\u9010\u6e10\u53d8\u5927\u4e00\u70b9\u3002<br \/>\n5 \u505a\u4e00\u4e2a\u5c0f\u4f8b\u5b50<\/p>\n<pre class=\"lang:matlab decode:true \" >p=[.1 .8 .1 .9; .2 .9 .1 .8] %\u8f93\u5165\u6570\u636e\r\nnet = newc([0 1;0 1],2); %0 1\u8868\u793a\u7b2c\u4e00\u4e2a\u53c2\u6570\u7684\u533a\u95f4\u57280-1\r\nnet.IW(1,1); %\u4e00\u5f00\u59cb\u90fd\u4f1a\u9009\u62e9\u5e73\u5747\u503c\u4f5c\u4e3a\u6743\u91cd\r\nbiases = net.b{1};\r\nnet.trainParam.epochs = 500; %\u8bad\u7ec3\u7684\u6b21\u6570\u4e3a500\u6b21\r\nnet = train(net,p);\r\na = sim(net,p); %\u89c2\u5bdf\u7ed3\u679c\r\nac = vec2ind(a);\r\n<\/pre>\n<p>\u7ed3\u679c<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"324\" data-permalink=\"https:\/\/tastestars.com\/index.php\/2017\/08\/09\/2-2\/%e6%88%aa%e5%9b%be-3\/\" data-orig-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-3.png\" data-orig-size=\"830,241\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\u622a\u56fe (3)\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-3.png\" data-large-file=\"https:\/\/tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-3.png\" src=\"http:\/\/www.tastestars.com\/wp-content\/uploads\/2017\/08\/\u622a\u56fe-3.png\" alt=\"\" width=\"830\" height=\"241\" class=\"alignnone size-full wp-image-324\" \/><\/p>\n<p>\u8bf4\u660e\u7b2c\u4e00\u7ec4\u548c\u7b2c\u4e09\u7ec4\u8f93\u5165\u5c5e\u4e8e\u7b2c\u4e00\u7c7b\uff0c<br \/>\n\u7b2c\u4e8c\u7ec4\u548c\u7b2c\u56db\u7ec4\u8f93\u5165\u5c5e\u4e8e\u7b2c\u4e8c\u7c7b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u7ade\u4e89\u6027\u795e\u7ecf\u7f51\u7edc\u5206\u7c7b \u25cf SOM\uff08Self&#8211;Organizing Feature Maps\uff09\u795e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[39],"tags":[43,5,42,56],"class_list":["post-323","post","type-post","status-publish","format-standard","hentry","category-matlabstudy","tag-matlab","tag-5","tag-42","tag-56"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9Hs6X-5d","_links":{"self":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":1,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":327,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions\/327"}],"wp:attachment":[{"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tastestars.com\/index.php\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}