{"id":4527,"date":"2019-07-06T08:37:04","date_gmt":"2019-07-06T00:37:04","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=4527"},"modified":"2019-07-06T08:37:04","modified_gmt":"2019-07-06T00:37:04","slug":"%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0-%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/4527.html","title":{"rendered":"\u673a\u5668\u5b66\u4e60-\u903b\u8f91\u56de\u5f52"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u60f3\u901a\u8fc7\u5feb\u901f\u6574\u7406\u300a\u673a\u5668\u5b66\u4e60\u5b9e\u6218\u300b\u4e00\u4e66\u4e2d\u51fa\u73b0\u8fc7\u7684\u5404\u79cd\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u7684\u539f\u7406\u53ca\u5176\u4f18\u7f3a\u70b9\u548c\u9002\u7528\u8303\u56f4\u6765\u5feb\u901f\u5b66\u4e60\u3001\u4e86\u89e3\u5e38\u89c1\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<h6 class=\"wp-block-heading\">1\u3001<strong>\u903b\u8f91\u56de\u5f52<\/strong>\u7b80\u4ecb<\/h6>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">\u903b\u8f91\u56de\u5f52\u7531\u7edf\u8ba1\u5b66\u5bb6 David Cox \u4e8e 1958 \u5e74\u63d0\u51fa\u3002\u4e0e\u4f20\u7edf\u7684\u7ebf\u6027\u56de\u5f52\u4e0d\u540c\uff0c<strong>\u903b\u8f91\u56de\u5f52\uff08logistic regression\uff09\u4e2d\u54cd\u5e94\u53d8\u91cf\uff08\u56e0\u53d8\u91cf\uff09\u7684\u53d6\u503c\u4e0d\u662f\u8fde\u7eed\u7684<\/strong><strong>\uff0c\u800c\u662f\u79bb\u6563\u7684\uff0c\u6bcf\u4e2a\u53d6\u503c\u4ee3\u8868\u4e00\u4e2a\u4e0d\u540c\u7684\u7c7b\u522b\u3002<\/strong>\u56e0\u6b64\uff0c<strong>\u903b\u8f91\u56de\u5f52\u7684\u672c\u8d28\u662f\u4e00\u4e2a\u5206\u7c7b\u5668\uff08classifier\uff09\u3002\u5b83\u662f\u4e00\u79cd\u6709\u76d1\u7763\u5b66\u4e60\uff0c\u901a\u8fc7\u8bad\u7ec3\u96c6\u6570\u636e\u4e2d\u7684\u6837\u672c\u7684\u7279\u5f81\u5411\u91cf x \u548c\u6807\u7b7e y\uff08\u5373\u54cd\u5e94\u53d8\u91cf\u7684\u7c7b\u522b\uff09\u6765\u8bad\u7ec3\u6a21\u578b\u7684\u53c2\u6570\uff0c\u5e76\u4f7f\u7528\u8be5\u6a21\u578b\u5bf9\u672a\u6765\u7684\u65b0\u6837\u672c\u8fdb\u884c\u5206\u7c7b\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u6700\u7b80\u5355\u7684\u903b\u8f91\u56de\u5f52\u4e2d\u54cd\u5e94\u53d8\u91cf\u662f\u4e8c\u5206\u7c7b\u7684\uff08binary\uff09<\/strong>\uff0c\u5373\u5b83\u4ec5\u4ec5\u53ef\u4ee5\u53d6\u4e24\u4e2a\u503c\uff0c\u4ee3\u8868\u4e0d\u540c\u7684\u4e24\u7c7b\u3002\u6309\u7167\u60ef\u4f8b\uff0c\u5b83\u7684\u53d6\u503c\u4e3a 0 \u548c 1\u3002\u5373\u4fbf\u662f\u6700\u7b80\u5355\u7684\u6a21\u578b\u4e5f\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u6bd4\u5982\u8fd9\u4e24\u7c7b\u53ef\u4ee5\u4ee3\u8868\u7740\u6bd4\u8d5b\u4e2d\u7684\u8f93\u548c\u8d62\u3001\u8003\u8bd5\u4e2d\u7684\u901a\u8fc7\u548c\u5931\u8d25\u3001\u533b\u7597\u9886\u57df\u7684\u5065\u5eb7\u548c\u751f\u75c5\u3001\u4ee5\u53ca\u80a1\u5e02\u4e2d\u7684\u6da8\u548c\u8dcc\u7b49\u3002\u5982\u679c\u54cd\u5e94\u53d8\u91cf\u7684\u53d6\u503c\u591a\u4e8e\u4e24\u7c7b\uff0c\u5219\u8fd9\u6837\u7684\u95ee\u9898\u53eb\u505a<strong>\u591a\u9879\u903b\u8f91\u56de\u5f52\uff08multinomial logistic regression\uff09<\/strong>\u3002<\/p>\n\n\n\n<p><strong>\u5728\u4e8c\u5143\u903b\u8f91\u56de\u5f52\u4e2d\uff0c\u56de\u5f52\u6a21\u578b\u6839\u636e\u6837\u672c\u70b9\u7684\u7279\u5f81\uff08features\uff09\u8ba1\u7b97\u8be5\u6837\u672c\u70b9\u5c5e\u4e8e\u6bcf\u4e00\u7c7b\u7684\u6761\u4ef6\u6982\u7387\u3002<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">\u5173\u4e8e\u903b\u8f91\u56de\u5f52\uff0c\u53ef\u4ee5\u7528\u4e00\u53e5\u8bdd\u6765\u603b\u7ed3\uff1a<strong>\u903b\u8f91\u56de\u5f52\u5047\u8bbe\u6570\u636e\u670d\u4ece\u4f2f\u52aa\u5229\u5206\u5e03\uff0c\u901a\u8fc7\u6781\u5927\u4f3c\u7136\u51fd\u6570\u7684\u65b9\u6cd5\uff0c\u8fd0\u7528\u68af\u5ea6\u4e0b\u964d\u6765\u6c42\u89e3\u53c2\u6570\uff0c\u6765\u8fbe\u5230\u5c06\u6570\u636e\u4e8c\u5206\u7c7b\u7684\u76ee\u7684\u3002<\/strong><\/p>\n\n\n\n<p>\u4e0b\u6587\u4e2d\u5982\u65e0\u7279\u6b8a\u8bf4\u660e\uff0c\u5f53\u6211\u4eec\u63d0\u5230\u201c\u903b\u8f91\u56de\u5f52\u201d\u65f6\uff0c\u6307\u4ee3\u7684\u90fd\u662f\u6700\u7b80\u5355\u7684\u4e8c\u5143\u903b\u8f91\u56de\u5f52\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>2\u3001<\/strong><strong>sigmoid\u51fd\u6570<\/strong><\/h6>\n\n\n\n<p>\u9996\u5148\u6211\u4eec\u4e86\u89e3\u4e00\u4e2a\u51fd\u6570\uff1a<strong>sigmoid<\/strong>\uff0c\u903b\u8f91\u56de\u5f52\u5c31\u662f\u57fa\u4e8e\u8fd9\u4e2a\u51fd\u6570\u6784\u5efa\u7684\u6a21\u578b\u3002sigmod\u51fd\u6570\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p style=\"text-align:center\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"63\" class=\"wp-image-4530\" style=\"width: 150px;\" src=\"https:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2019\/07\/sigmoid-1.png\" alt=\"\" srcset=\"https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/07\/sigmoid-1.png 360w, https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/07\/sigmoid-1-300x125.png 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/p>\n\n\n\n<p>\u4f7f\u7528Python\u7684numpy\uff0cmatplotlib\u5bf9\u8be5\u51fd\u6570\u8fdb\u884c\u53ef\u89c6\u5316\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"358\" class=\"wp-image-4528\" src=\"https:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2019\/07\/sigmoid_virtualize.jpg\" alt=\"\" style=\"width: 672px;\" srcset=\"https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/07\/sigmoid_virtualize.jpg 709w, https:\/\/ixyzero.com\/wp-content\/uploads\/2019\/07\/sigmoid_virtualize-300x160.jpg 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/p>\n\n\n\n<p>\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u76f4\u89c2\u5730\u770b\u5230\u8fd9\u4e2a\u51fd\u6570\u7684\u4e00\u4e9b\u7279\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4e2d\u95f4\u8303\u56f4\u5185\u51fd\u6570\u659c\u7387\u6700\u5927\uff0c\u5bf9\u5e94Y\u7684\u5927\u90e8\u5206\u6570\u503c\u53d8\u5316<\/li><li>Y\u8f74\u6570\u503c\u8303\u56f4\u5728 0~1 \u4e4b\u95f4<\/li><li>X\u8f74\u6570\u503c\u8303\u56f4\u6ca1\u6709\u9650\u5236\uff0c\u4f46\u5f53X\u5927\u4e8e\u4e00\u5b9a\u6570\u503c\u540e\uff0cY\u65e0\u9650\u8d8b\u8fd1\u4e8e1\uff0c\u800c\u5c0f\u4e8e\u4e00\u5b9a\u6570\u503c\u540e\uff0cY\u65e0\u9650\u8d8b\u8fd1\u4e8e0<\/li><li>\u7279\u522b\u5730\uff0c\u5f53 X=0 \u65f6\uff0cY=0.5<\/li><\/ul>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>3\u3001\u903b\u8f91\u56de\u5f52\u7684\u4f18\u7f3a\u70b9<\/strong><\/h6>\n\n\n\n<p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u76f4\u63a5\u5bf9\u5206\u7c7b\u53ef\u80fd\u6027\u8fdb\u884c\u5efa\u6a21\uff0c\u65e0\u9700\u5b9e\u73b0\u5047\u8bbe\u6570\u636e\u5206\u5e03<\/strong>\uff0c\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u5047\u8bbe\u5206\u5e03\u4e0d\u51c6\u786e\u6240\u5e26\u6765\u7684\u95ee\u9898\u3002<\/li><li><strong>\u5f62\u5f0f\u7b80\u5355\uff0c\u6a21\u578b\u7684\u53ef\u89e3\u91ca\u6027\u975e\u5e38\u597d<\/strong>\uff0c\u7279\u5f81\u7684\u6743\u91cd\u53ef\u4ee5\u770b\u5230\u4e0d\u540c\u7684\u7279\u5f81\u5bf9\u6700\u540e\u7ed3\u679c\u7684\u5f71\u54cd\u3002&nbsp;<\/li><li>\u9664\u4e86\u7c7b\u522b\uff0c\u8fd8\u80fd\u5f97\u5230\u8fd1\u4f3c\u6982\u7387\u9884\u6d4b\uff0c\u8fd9\u5bf9\u8bb8\u591a\u9700\u5229\u7528\u6982\u7387\u8f85\u52a9\u51b3\u7b56\u7684\u4efb\u52a1\u5f88\u6709\u7528\u3002<\/li><\/ol>\n\n\n\n<p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u51c6\u786e\u7387\u4e0d\u662f\u5f88\u9ad8\uff0c\u56e0\u4e3a\u5f62\u5f0f\u975e\u5e38\u7684\u7b80\u5355\uff0c\u5f88\u96be\u53bb\u62df\u5408\u6570\u636e\u7684\u771f\u5b9e\u5206\u5e03\u3002<\/strong><\/li><li>\u672c\u8eab\u65e0\u6cd5\u7b5b\u9009\u7279\u5f81\u3002<\/li><\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/gwtLnE5jAiv8iNv1TbOKYw\"><strong>\u903b\u8f91\u56de\u5f52\u6a21\u578b\u7684\u524d\u4e16\u4eca\u751f<\/strong><\/a><\/li><li><strong><a href=\"https:\/\/mp.weixin.qq.com\/s\/Ze23oMDmJy25HWnsp3ZNlQ\">\u903b\u8f91\u56de\u5f52\uff0c\u5f88\u6709\u903b\u8f91<\/a><\/strong>#<strong>\u6709\u4f8b\u5b50\u6613\u4e8e\u7406\u89e3<\/strong><\/li><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/Yac9P6X3tPBJNz1WxZMX9Q\"><strong>\u903b\u8f91\u56de\u5f52\u7b97\u6cd5\u7684\u539f\u7406\u53ca\u5b9e\u73b0(LR)<\/strong><\/a><\/li><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/O4N5UvM1vDbNAtFgFg8zIA\">\u903b\u8f91\u56de\u5f52\uff1a\u4ece\u5165\u95e8\u5230\u7cbe\u901a\uff08\u5168\u658720\u9875\u4e0b\u8f7d\uff09<\/a><\/li><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/A9U4YvusAF3NaLT0c6HeaA\">\u673a\u5668\u5b66\u4e60\uff1a\u7528\u521d\u7b49\u6570\u5b66\u89e3\u8bfb\u903b\u8f91\u56de\u5f52<\/a><\/li><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/BJxdDz7DQg5QIWzzgNQrgA\">\u3010\u673a\u5668\u5b66\u4e60\u7b14\u8bb0\u3011\uff1a\u4ece\u96f6\u5f00\u59cb\u5b66\u4f1a\u903b\u8f91\u56de\u5f52\uff08\u4e00\uff09<\/a><\/li><li><a href=\"https:\/\/mp.weixin.qq.com\/s\/h-crew7azQK5FaUtSE7Hig\">\u6587\u79d1\u751f\u90fd\u80fd\u770b\u61c2\u7684\u673a\u5668\u5b66\u4e60\u6559\u7a0b\uff1a\u68af\u5ea6\u4e0b\u964d\u3001\u7ebf\u6027\u56de\u5f52\u3001\u903b\u8f91\u56de\u5f52<\/a><\/li><li><a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.LogisticRegression.html\">https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.LogisticRegression.html<\/a><\/li><li><a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.LogisticRegressionCV.html\">https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.LogisticRegressionCV.html<\/a><\/li><\/ul>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u60f3\u901a\u8fc7\u5feb\u901f\u6574\u7406\u300a\u673a\u5668\u5b66\u4e60\u5b9e\u6218\u300b\u4e00\u4e66\u4e2d\u51fa\u73b0\u8fc7\u7684\u5404\u79cd\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u7684\u539f\u7406\u53ca\u5176\u4f18\u7f3a\u70b9\u548c\u9002\u7528\u8303\u56f4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,1275],"tags":[1464,1441,1457,9,1463],"class_list":["post-4527","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-1275","tag-logisticregression","tag-machinelearning","tag-1457","tag-9","tag-1463"],"views":3489,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=4527"}],"version-history":[{"count":2,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4527\/revisions"}],"predecessor-version":[{"id":4531,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4527\/revisions\/4531"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=4527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=4527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=4527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}