{"id":8894,"date":"2024-05-22T23:01:01","date_gmt":"2024-05-22T15:01:01","guid":{"rendered":""},"modified":"2024-05-22T23:01:01","modified_gmt":"2024-05-22T15:01:01","slug":"\u674e\u5b8f\u6bc5\u673a\u5668\u5b66\u4e60\u4f5c\u4e1a2:Winner\u8fd8\u662fLosser\uff08\u542b\u8bad\u7ec3\u6570\u636e\uff09\u300c\u5efa\u8bae\u6536\u85cf\u300d","status":"publish","type":"post","link":"https:\/\/mushiming.com\/8894.html","title":{"rendered":"\u674e\u5b8f\u6bc5\u673a\u5668\u5b66\u4e60\u4f5c\u4e1a2:Winner\u8fd8\u662fLosser\uff08\u542b\u8bad\u7ec3\u6570\u636e\uff09\u300c\u5efa\u8bae\u6536\u85cf\u300d"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u8bad\u7ec3\u6570\u636e\u4ee5\u53ca\u6e90\u4ee3\u7801\u5728\u6211\u7684Github\uff1a<\/strong>https:\/\/github.com\/taw19960426\/DeepLearning\/tree\/master\/%E4%BD%9C%E4%B8%9A\/%E4%BD%9C%E4%B8%9A2%E6%95%B0%E6%8D%AE<\/code><\/p>\n

\u4e00\u3001\u4f5c\u4e1a\u8bf4\u660e<\/h4>\n

\u7ed9\u5b9a\u8bad\u7ec3\u96c6spam_train.csv\uff0c\u8981\u6c42\u6839\u636e\u6bcf\u4e2aID\u5404\u79cd\u5c5e\u6027\u503c\u6765\u5224\u65ad\u8be5ID\u5bf9\u5e94\u89d2\u8272\u662fWinner\u8fd8\u662fLosser(\u6536\u5165\u662f\u5426\u5927\u4e8e50K)\uff0c\u8fd9\u662f\u4e00\u4e2a\u5178\u578b\u7684\u4e8c\u5206\u7c7b\u95ee\u9898\u3002<\/p>\n

    \n
  • \n

    CSV\u6587\u4ef6\uff0c\u5927\u5c0f\u4e3a4000\u884cX59\u5217;<\/p>\n<\/li>\n

  • \n

    4000\u884c\u6570\u636e\u5bf9\u5e94\u77404000\u4e2a\u89d2\u8272\uff0cID\u7f16\u53f7\u4ece1\u52304001;<\/p>\n<\/li>\n

  • \n

    59\u5217\u6570\u636e\u4e2d\uff0c \u7b2c\u4e00\u5217\u4e3a\u89d2\u8272ID\uff0c\u6700\u540e\u4e00\u5217\u4e3a\u5206\u7c7b\u7ed3\u679c\uff0c\u5373label(0\u30011\u4e24\u79cd)\uff0c\u4e2d\u95f4\u768457\u5217\u4e3a\u89d2\u8272\u5bf9\u5e94\u768457\u79cd\u5c5e\u6027\u503c\uff1b<\/p>\n<\/li>\n<\/ul>\n

    \u4e8c\u3001\u601d\u8def\u5206\u6790<\/h4>\n

    2.1 \u601d\u8def\u5206\u6790<\/h5>\n

    \u8fd9\u662f\u4e00\u4e2a\u5178\u578b\u7684\u4e8c\u5206\u7c7b\u95ee\u9898\uff0c\u7ed3\u5408\u8bfe\u4e0a\u6240\u5b66\u5185\u5bb9\uff0c\u51b3\u5b9a\u91c7\u7528Logistic\u56de\u5f52\u7b97\u6cd5\u3002<\/p>\n

    \u4e0e\u7ebf\u6027\u56de\u5f52\u7528\u4e8e\u9884\u6d4b\u4e0d\u540c\uff0cLogistic\u56de\u5f52\u5219\u5e38\u7528\u4e8e\u5206\u7c7b(\u901a\u5e38\u662f\u4e8c\u5206\u7c7b\u95ee\u9898)\u3002Logistic\u56de\u5f52\u5b9e\u8d28\u4e0a\u5c31\u662f\u5728\u666e\u901a\u7684\u7ebf\u6027\u56de\u5f52\u540e\u9762\u52a0\u4e0a\u4e86\u4e00\u4e2asigmoid\u51fd\u6570\uff0c\u628a\u7ebf\u6027\u56de\u5f52\u9884\u6d4b\u5230\u7684\u6570\u503c\u538b\u7f29\u6210\u4e3a\u4e00\u4e2a\u6982\u7387\uff0c\u8fdb\u800c\u5b9e\u73b0\u4e8c\u5206\u7c7b\uff08\u5173\u4e8e\u7ebf\u6027\u56de\u5f52\u6a21\u578b\uff0c\u53ef\u53c2\u8003\u4e0a\u4e00\u6b21\u4f5c\u4e1a\uff09\u3002<\/p>\n

    \u5728\u635f\u5931\u51fd\u6570\u65b9\u9762\uff0cLogistic\u56de\u5f52\u5e76\u6ca1\u6709\u4f7f\u7528\u4f20\u7edf\u7684\u6b27\u5f0f\u8ddd\u79bb\u6765\u5ea6\u91cf\u8bef\u5dee\uff0c\u800c\u4f7f\u7528\u4e86\u4ea4\u53c9\u71b5(\u7528\u4e8e\u8861\u91cf\u4e24\u4e2a\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u76f8\u4f3c\u7a0b\u5ea6)\u3002
    \u3000\u3000\"\u674e\u5b8f\u6bc5\u673a\u5668\u5b66\u4e60\u4f5c\u4e1a2:Winner\u8fd8\u662fLosser\uff08\u542b\u8bad\u7ec3\u6570\u636e\uff09\u300c\u5efa\u8bae\u6536\u85cf\u300d<\/p>\n

    2.2 \u6570\u636e\u9884\u5904\u7406<\/h5>\n

    \u5728\u673a\u5668\u5b66\u4e60\u4e2d\uff0c\u6570\u636e\u7684\u9884\u5904\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u73af\uff0c\u80fd\u76f4\u63a5\u5f71\u54cd\u5230\u6a21\u578b\u6548\u679c\u7684\u597d\u574f\u3002\u672c\u6b21\u4f5c\u4e1a\u7684\u6570\u636e\u76f8\u5bf9\u7b80\u5355\u7eaf\u51c0\uff0c\u5728\u6570\u636e\u9884\u5904\u7406\u65b9\u9762\u5e76\u4e0d\u9700\u8981\u82b1\u592a\u591a\u7cbe\u529b\u3002<\/p>\n

    \u9996\u5148\u662f\u7a7a\u503c\u5904\u7406(\u5c3d\u7ba1\u6ca1\u770b\u5230\u7a7a\u503c\uff0c\u4f46\u4e3a\u4e86\u4ee5\u9632\u4e07\u4e00\uff0c\u8fd8\u662f\u505a\u4e00\u4e0b)\uff0c\u6240\u6709\u7a7a\u503c\u75280\u586b\u5145(\u4e5f\u53ef\u4ee5\u7528\u5e73\u5747\u503c\u3001\u4e2d\u4f4d\u6570\u7b49\uff0c\u89c6\u5177\u4f53\u60c5\u51b5\u800c\u5b9a)\u3002<\/p>\n

    \u63a5\u7740\u5c31\u662f\u628a\u6570\u636e\u8303\u56f4\u5c3d\u91cfscale\u5230\u540c\u4e00\u4e2a\u6570\u91cf\u7ea7\u4e0a\uff0c\u89c2\u5bdf\u6570\u636e\u540e\u53d1\u73b0\uff0c\u591a\u6570\u6570\u636e\u503c\u4e3a0\uff0c\u975e0\u503c\u4e5f\u90fd\u57281\u9644\u8fd1\uff0c\u53ea\u6709\u5012\u6570\u7b2c\u4e8c\u5217\u548c\u5012\u6570\u7b2c\u4e09\u5217\u6570\u636e\u503c\u8f83\u5927\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e24\u5217\u5206\u522b\u9664\u4e0a\u6bcf\u5217\u7684\u5e73\u5747\u503c\uff0c\u628a\u6570\u503c\u8303\u56f4\u62c9\u52301\u9644\u8fd1\u3002<\/p>\n

    \u7531\u4e8e\u5e76\u6ca1\u6709\u7ed9\u51fa\u8fd957\u4e2a\u5c5e\u6027\u5177\u4f53\u662f\u4ec0\u4e48\u5c5e\u6027\uff0c\u56e0\u6b64\u65e0\u6cd5\u5bf9\u6570\u636e\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u6316\u6398\u5e94\u7528\u3002<\/p>\n

    \u4e0a\u8ff0\u64cd\u4f5c\u5b8c\u6210\u540e\uff0c\u5c06\u8868\u683c\u7684\u7b2c2\u5217\u81f358\u5217\u53d6\u51fa\u4e3ax(shape\u4e3a4000X57)\uff0c\u5c06\u6700\u540e\u4e00\u5217\u53d6\u51fa\u505alabel y(shape\u4e3a4000X1)\u3002\u8fdb\u4e00\u6b65\u5212\u5206\u8bad\u7ec3\u96c6\u548c\u9a8c\u8bc1\u96c6\uff0c\u5206\u522b\u53d6x\u3001y\u4e2d\u524d3500\u4e2a\u6837\u672c\u4e3a\u8bad\u7ec3\u96c6x_test(shape\u4e3a3500X57)\uff0cy_test(shape\u4e3a3500X1)\uff0c\u540e500\u4e2a\u6837\u672c\u4e3a\u9a8c\u8bc1\u96c6x_val(shape\u4e3a500X57)\uff0cy_val(shape\u4e3a500X1)\u3002<\/p>\n

    \u6570\u636e\u9884\u5904\u7406\u5230\u6b64\u7ed3\u675f\u3002<\/p>\n

    #\u6570\u636e\u7684\u9884\u5904\u7406<\/span>\n    df=<\/span>pd.<\/span>read_csv(<\/span>'spam_train.csv'<\/span>)<\/span>#\u8bfb\u6587\u4ef6<\/span>\n    df=<\/span>df.<\/span>fillna(<\/span>0<\/span>)<\/span>#\u7a7a\u503c\u75280\u586b\u5145<\/span>\n    array=<\/span>np.<\/span>array(<\/span>df)<\/span>#\u8f6c\u5316\u4e3a\u5bf9\u8c61\uff084000\uff0c49\uff09<\/span>\n    x=<\/span>array[<\/span>:<\/span>,<\/span>1<\/span>:<\/span>-<\/span>1<\/span>]<\/span>#\u629b\u5f03\u7b2c\u4e00\u5217\u548c\u6700\u540e\u4e00\u5217shape(4000,47)<\/span>\n    y=<\/span>array[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>#\u6700\u540e\u4e00\u5217label<\/span>\n    #\u5c06\u5012\u6570\u7b2c\u4e8c\u5217\u548c\u7b2c\u4e09\u5217\u9664\u4ee5\u5e73\u5747\u503c<\/span>\n    x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>=<\/span>x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>\/<\/span>np.<\/span>mean(<\/span>x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>)<\/span>\n    x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span> =<\/span> x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span> \/<\/span> np.<\/span>mean(<\/span>x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span>)<\/span>\n\n    #\u5212\u5206\u6d4b\u8bd5\u96c6\u548c\u9a8c\u8bc1\u96c6<\/span>\n    x_train=<\/span>x[<\/span>0<\/span>:<\/span>3500<\/span>,<\/span>:<\/span>]<\/span>\n    y_train =<\/span> y[<\/span>0<\/span>:<\/span>3500<\/span>]<\/span>\n    x_val=<\/span>x[<\/span>3500<\/span>:<\/span>4001<\/span>,<\/span>:<\/span>]<\/span>\n    y_val=<\/span>y[<\/span>3500<\/span>:<\/span>4001<\/span>]<\/span>\n<\/code><\/pre>\n

    2.3 \u6a21\u578b\u5efa\u7acb<\/h4>\n

    2.3.1 \u7ebf\u6027\u56de\u5f52<\/h5>\n

    \u5148\u5bf9\u6570\u636e\u505a\u7ebf\u6027\u56de\u5f52\uff0c\u5f97\u51fa\u6bcf\u4e2a\u6837\u672c\u5bf9\u5e94\u7684\u56de\u5f52\u503c\u3002\u4e0b\u5f0f\u4e3a\u5bf9\u7b2cn\u4e2a\u6837\u672c x n x^{n} <\/span><\/span>x<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u7684\u56de\u5f52\uff0c\u56de\u5f52\u7ed3\u679c\u4e3a y n y^{n} <\/span><\/span>y<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u3002<\/p>\n

    y n = \u2211 i = 1 57 w i x i n + b \\mathrm{y}^{n}=\\sum_{i=1}^{57} w_{i} x_{i}^{n}+b <\/span><\/span>y<\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span><\/span>i<\/span>=<\/span>1<\/span><\/span><\/span><\/span><\/span>\u2211<\/span><\/span><\/span><\/span>5<\/span>7<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>w<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>x<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>+<\/span><\/span><\/span><\/span>b<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n

    2.3.2 sigmoid\u51fd\u6570\u538b\u7f29\u56de\u5f52\u503c<\/h5>\n

    \u4e4b\u540e\u5c06\u56de\u5f52\u7ed3\u679c\u9001\u8fdbsigmoid\u51fd\u6570\uff0c\u5f97\u5230\u6982\u7387\u503c\u3002
    p n = 1 1 + e \u2212 y n p^{n}=\\frac{1}{1+e^{-y^{n}}} <\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span><\/span><\/span>1<\/span><\/span>+<\/span><\/span>e<\/span><\/span>\u2212<\/span>y<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>1<\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n

    2.3.3 \u8bef\u5dee\u53cd\u5411\u4f20\u64ad<\/h5>\n

    \u63a5\u7740\u5c31\u5230\u91cd\u5934\u620f\u4e86\u3002\u4f17\u6240\u5468\u77e5\uff0c\u4e0d\u7ba1\u7ebf\u6027\u56de\u5f52\u8fd8\u662fLogistic\u56de\u5f52\uff0c\u5176\u5173\u952e\u548c\u6838\u5fc3\u5c31\u5728\u4e8e\u901a\u8fc7\u8bef\u5dee\u7684\u53cd\u5411\u4f20\u64ad\u6765\u66f4\u65b0\u53c2\u6570\uff0c\u8fdb\u800c\u4f7f\u6a21\u578b\u4e0d\u65ad\u4f18\u5316\u3002\u56e0\u6b64\uff0c\u635f\u5931\u51fd\u6570\u7684\u786e\u5b9a\u53ca\u5bf9\u5404\u53c2\u6570\u7684\u6c42\u5bfc\u5c31\u6210\u4e86\u91cd\u4e2d\u4e4b\u91cd\u3002\u5728\u5206\u7c7b\u95ee\u9898\u4e2d\uff0c\u6a21\u578b\u4e00\u822c\u9488\u5bf9\u5404\u7c7b\u522b\u8f93\u51fa\u4e00\u4e2a\u6982\u7387\u5206\u5e03\uff0c\u56e0\u6b64\u5e38\u7528\u4ea4\u53c9\u71b5\u4f5c\u4e3a\u635f\u5931\u51fd\u6570\u3002\u4ea4\u53c9\u71b5\u53ef\u7528\u4e8e\u8861\u91cf\u4e24\u4e2a\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u76f8\u4f3c\u3001\u7edf\u4e00\u7a0b\u5ea6\uff0c\u4e24\u4e2a\u6982\u7387\u5206\u5e03\u8d8a\u76f8\u4f3c\u3001\u8d8a\u7edf\u4e00\uff0c\u5219\u4ea4\u53c9\u71b5\u8d8a\u5c0f\uff1b\u53cd\u4e4b\uff0c\u4e24\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u5dee\u5f02\u8d8a\u5927\u3001\u8d8a\u6df7\u4e71\uff0c\u5219\u4ea4\u53c9\u71b5\u8d8a\u5927\u3002<\/p>\n

    \u4e0b\u5f0f\u8868\u793ak\u5206\u7c7b\u95ee\u9898\u7684\u4ea4\u53c9\u71b5\uff0cP\u4e3alabel\uff0c\u662f\u4e00\u4e2a\u6982\u7387\u5206\u5e03\uff0c\u5e38\u7528one_hot\u7f16\u7801\u3002\u4f8b\u5982\u9488\u5bf93\u5206\u7c7b\u95ee\u9898\u800c\u8a00\uff0c\u82e5\u6837\u672c\u5c5e\u4e8e\u7b2c\u4e00\u7c7b\uff0c\u5219P\u4e3a(1,0,0)\uff0c\u82e5\u5c5e\u4e8e\u7b2c\u4e8c\u7c7b\uff0c\u5219P\u4e3a(0,1,0)\uff0c\u82e5\u5c5e\u4e8e\u7b2c\u4e09\u7c7b\uff0c\u5219\u4e3a(0,0,1)\u3002\u5373\u6240\u5c5e\u7684\u7c7b\u6982\u7387\u503c\u4e3a1\uff0c\u5176\u4ed6\u7c7b\u6982\u7387\u503c\u4e3a0\u3002Q\u4e3a\u6a21\u578b\u5f97\u51fa\u7684\u6982\u7387\u5206\u5e03\uff0c\u53ef\u4ee5\u662f(0.1,0.8,0.1)\u7b49\u3002
    \u3000\u3000 Loss \u2061 n = \u2212 \u2211 1 k P n ln \u2061 Q n \\operatorname{Loss}^{n}=-\\sum_{1}^{k} P^{n} \\ln Q^{n} <\/span><\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span>\u2212<\/span><\/span><\/span>1<\/span><\/span><\/span><\/span><\/span>\u2211<\/span><\/span><\/span><\/span>k<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>P<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>ln<\/span><\/span>Q<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>
    \u9488\u5bf9\u672c\u6b21\u4f5c\u4e1a\u800c\u8a00\uff0c\u867d\u7136\u6a21\u578b\u53ea\u8f93\u51fa\u4e86\u4e00\u4e2a\u6982\u7387\u503cp\uff0c\u4f46\u7531\u4e8e\u5904\u7406\u7684\u662f\u4e8c\u5206\u7c7b\u95ee\u9898\uff0c\u56e0\u6b64\u53ef\u4ee5\u5f88\u5feb\u6c42\u51fa\u53e6\u4e00\u6982\u7387\u503c\u4e3a1-p\uff0c\u5373\u53ef\u89c6\u4e3a\u6a21\u578b\u8f93\u51fa\u7684\u6982\u7387\u5206\u5e03\u4e3aQ(p\uff0c1-p)\u3002\u5c06\u672c\u6b21\u7684label\u89c6\u4e3a\u6982\u7387\u5206\u5e03P(y,1-y)\uff0c\u5373Winner(label\u4e3a1)\u7684\u6982\u7387\u5206\u5e03\u4e3a(1,0)\uff0c\u5206\u7c7b\u4e3aLosser(label\u4e3a0)\u7684\u6982\u7387\u5206\u5e03\u4e3a(0,1)\u3002
    Loss \u2061 n = \u2212 [ y ^ n ln \u2061 p n + ( 1 \u2212 y ^ n ) ln \u2061 ( 1 \u2212 p n ) ] \\operatorname{Loss}^{n}=-\\left[\\hat{y}^{n} \\ln p^{n}+\\left(1-\\hat{y}^{n}\\right) \\ln \\left(1-p^{n}\\right)\\right] <\/span><\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span>\u2212<\/span><\/span>[<\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>ln<\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>+<\/span><\/span>(<\/span>1<\/span><\/span>\u2212<\/span><\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span><\/span>ln<\/span><\/span>(<\/span>1<\/span><\/span>\u2212<\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span>]<\/span><\/span><\/span><\/span><\/span><\/span><\/span>
    \u635f\u5931\u51fd\u6570\u5bf9\u6743\u91cdw\u6c42\u504f\u5bfc\uff0c\u53ef\u5f97\uff1a
    \u2202 L o s s n \u2202 w i = \u2212 x i [ y ^ n \u2212 p n ] \\frac{\\partial L o s s^{n}}{\\partial w_{i}}=-x_{i}\\left[\\hat{y}^{n}-p^{n}\\right] <\/span><\/span><\/span><\/span>\u2202<\/span>w<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u2202<\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span>\u2212<\/span>x<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>[<\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u2212<\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>]<\/span><\/span><\/span><\/span><\/span><\/span><\/span>
    \u540c\u7406\uff0c\u635f\u5931\u51fd\u6570\u5bf9\u504f\u7f6eb\u6c42\u504f\u5bfc\uff0c\u53ef\u5f97\uff1a
    \u2202 L o s s n \u2202 b = \u2212 [ y ^ n \u2212 p n ] \\frac{\\partial L o s s^{n}}{\\partial b}=-\\left[\\hat{y}^{n}-p^{n}\\right] <\/span><\/span><\/span><\/span>\u2202<\/span>b<\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u2202<\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span>\u2212<\/span><\/span>[<\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u2212<\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>]<\/span><\/span><\/span><\/span><\/span><\/span><\/span>
    \u8bfe\u4ef6\u4e0a\u7684\u516c\u5f0f\uff1a<\/strong><\/p>\n

      \n
    • \n

      \u52a0\u6b63\u5219\u5316 Loss \u2061 n = \u2212 \u2211 1 k p n ln \u2061 Q n + \u03bb ( w i ) 2 \\operatorname{Loss}^{n}=-\\sum_{1}^{k} p^{n} \\ln Q^{n}+\\lambda\\left(w_{i}\\right)^{2} <\/span><\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span>\u2212<\/span><\/span><\/span>1<\/span><\/span><\/span><\/span><\/span>\u2211<\/span><\/span><\/span><\/span>k<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>p<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>ln<\/span><\/span>Q<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>+<\/span><\/span><\/span><\/span>\u03bb<\/span><\/span>(<\/span>w<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span><\/span>2<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<\/li>\n

    • \n

      Loss \u2061 n = \u2211 n \u2212 [ y ^ n ln \u2061 f w , b ( x n ) + ( 1 \u2212 y ^ n ) ln \u2061 ( 1 \u2212 f w , b ( x n ) ) ] \\operatorname{Loss}^{n}=\\sum_{n}-\\left[\\hat{y}^{n} \\ln f_{w, b}\\left(x^{n}\\right)+\\left(1-\\hat{y}^{n}\\right) \\ln \\left(1-f_{w, b}\\left(x^{n}\\right)\\right)\\right] <\/span><\/span>L<\/span>o<\/span>s<\/span>s<\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>=<\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span>\u2211<\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>\u2212<\/span><\/span>[<\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>ln<\/span><\/span>f<\/span><\/span>w<\/span>,<\/span>b<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>(<\/span>x<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span><\/span>+<\/span><\/span>(<\/span>1<\/span><\/span>\u2212<\/span><\/span><\/span>y<\/span><\/span><\/span><\/span>^<\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span><\/span>ln<\/span><\/span>(<\/span>1<\/span><\/span>\u2212<\/span><\/span>f<\/span><\/span>w<\/span>,<\/span>b<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>(<\/span>x<\/span><\/span>n<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>)<\/span><\/span>)<\/span><\/span>]<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<\/li>\n

    • \n

      f w , b ( x ) = \u03c3 ( z ) = 1 \/ 1 + exp \u2061 ( \u2212 z ) \\begin{array}{l}{f_{w, b}(x)=\\sigma(z)} {=1 \/ 1+\\exp (-z)}\\end{array} <\/span><\/span><\/span><\/span>f<\/span><\/span>w<\/span>,<\/span>b<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>(<\/span>x<\/span>)<\/span><\/span>=<\/span><\/span>\u03c3<\/span>(<\/span>z<\/span>)<\/span><\/span>=<\/span><\/span>1<\/span>\/<\/span>1<\/span><\/span>+<\/span><\/span>exp<\/span>(<\/span>\u2212<\/span>z<\/span>)<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<\/li>\n

    • \n

      z = w \u22c5 x + b = \u2211 i w i x i + b \\quad z=w \\cdot x+b=\\sum_{i} w_{i} x_{i}+b <\/span><\/span><\/span>z<\/span><\/span>=<\/span><\/span><\/span><\/span>w<\/span><\/span>\u22c5<\/span><\/span><\/span><\/span>x<\/span><\/span>+<\/span><\/span><\/span><\/span>b<\/span><\/span>=<\/span><\/span><\/span><\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u2211<\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>w<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>x<\/span><\/span>i<\/span><\/span><\/span><\/span><\/span>\u200b<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>+<\/span><\/span><\/span><\/span>b<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<\/li>\n<\/ul>\n

      2.3.4 \u53c2\u6570\u66f4\u65b0<\/h5>\n

      \u6c42\u51fa\u68af\u5ea6\u540e\uff0c\u518d\u62ff\u539f\u53c2\u6570\u51cf\u53bb\u68af\u5ea6\u4e0e\u5b66\u4e60\u7387\u7684\u4e58\u79ef\uff0c\u5373\u53ef\u5b9e\u73b0\u53c2\u6570\u7684\u66f4\u65b0\u3002<\/p>\n

      #\u5e73\u5747\u6570<\/span>\n        b_g\/=<\/span>num\n        w_g\/=<\/span>num\n\n        #adagrad<\/span>\n        bg2_sum+=<\/span>b_g**<\/span>2<\/span>\n        wg2_sum+=<\/span>w_g**<\/span>2<\/span>\n        #\u66f4\u65b0w\u548cb<\/span>\n        weights-=<\/span>Learning_rate\/<\/span>wg2_sum**<\/span>0.5<\/span>*<\/span>w_g\n        bias-=<\/span>Learning_rate\/<\/span>bg2_sum**<\/span>0.5<\/span>*<\/span>b_g\n<\/code><\/pre>\n

      \u4e09\u3001\u4ee3\u7801\u5206\u4eab\u4e0e\u7ed3\u679c\u663e\u793a<\/h4>\n

      3.1 \u6e90\u4ee3\u7801<\/h5>\n
      import<\/span> numpy as<\/span> np\nimport<\/span> pandas as<\/span> pd\n\ndef<\/span> train<\/span>(<\/span>x_train,<\/span>y_train,<\/span>epoch)<\/span>:<\/span>\n    num=<\/span>x_train.<\/span>shape[<\/span>0<\/span>]<\/span>\n    '''y.shape \u8fd4\u56de\u7684\u4e00\u4e2a\u5143\u7ec4\uff0c\u4ee3\u8868 y \u6570\u636e\u96c6\u7684\u4fe1\u606f\u5982\uff08\u884c\uff0c\u5217\uff09 y.shape[0], \u610f\u601d\u662f\uff1a\u8fd4\u56de y \u4e2d\u884c\u7684\u603b\u6570\u3002\u8fd9\u4e2a\u503c\u5728 y \u662f\u5355\u7279\u5f81\u7684\u60c5\u51b5\u4e0b \u548c len(y) \u662f\u7b49\u4ef7\u7684\uff0c \u5373\u6570\u636e\u96c6\u4e2d\u6570\u636e\u70b9\u7684\u603b\u6570\u3002'''<\/span>\n    dim=<\/span>x_train.<\/span>shape[<\/span>1<\/span>]<\/span>\n    bias=<\/span>0<\/span>#\u504f\u7f6e\u521d\u59cb\u5316<\/span>\n    weights=<\/span>np.<\/span>ones(<\/span>dim)<\/span>#\u6743\u91cd\u521d\u59cb\u5316<\/span>\n    Learning_rate=<\/span>1<\/span>#\u5b66\u4e60\u7387\u548c\u6b63\u5219\u9879\u7cfb\u6570\u521d\u59cb\u5316<\/span>\n    Regular_coefficient=<\/span>0.001<\/span>\n    #\u7528\u4e8e\u5b58\u653e\u504f\u7f6e\u503c\u7684\u68af\u5ea6\u5e73\u65b9\u548c,adagrad\u7528\u5230<\/span>\n    bg2_sum=<\/span>0<\/span>\n    wg2_sum=<\/span>np.<\/span>zeros(<\/span>dim)<\/span>\n\n    #\u8fed\u4ee3\u6c42w,b<\/span>\n    for<\/span> i in<\/span> range<\/span>(<\/span>epoch)<\/span>:<\/span>\n        b_g=<\/span>0<\/span>#\u521d\u59cb\u5316<\/span>\n        w_g=<\/span>np.<\/span>zeros(<\/span>dim)<\/span>\n       # \u8ba1\u7b97\u68af\u5ea6\uff0c\u68af\u5ea6\u8ba1\u7b97\u65f6\u9488\u5bf9\u635f\u5931\u51fd\u6570\u6c42\u5bfc,\u5728\u6240\u6709\u6570\u636e\u4e0a<\/span>\n        for<\/span> j in<\/span> range<\/span>(<\/span>num)<\/span>:<\/span>\n            z=<\/span>weights.<\/span>dot(<\/span>x_train[<\/span>j,<\/span>:<\/span>]<\/span>)<\/span>+<\/span>bias#Z\u51fd\u6570\u8868\u8fbe\u5f0f<\/span>\n            sigmoid=<\/span>1<\/span>\/<\/span>(<\/span>1<\/span>+<\/span>np.<\/span>exp(<\/span>-<\/span>z)<\/span>)<\/span>#sigmoid function<\/span>\n            #\u635f\u5931\u51fd\u6570\u5bf9b\u6c42\u5bfc<\/span>\n            b_g+=<\/span>(<\/span>(<\/span>-<\/span>1<\/span>)<\/span>*<\/span>(<\/span>y_train[<\/span>j]<\/span>-<\/span>sigmoid)<\/span>)<\/span>\n            # \u635f\u5931\u51fd\u6570\u5bf9w\u6c42\u5bfc,\u5e76\u4e14\u6709\u6b63\u5219\u5316\uff08\u9632overfitting)<\/span>\n\n            for<\/span> k in<\/span> range<\/span>(<\/span>dim)<\/span>:<\/span>\n                w_g[<\/span>k]<\/span>+=<\/span>(<\/span>-<\/span>1<\/span>)<\/span>*<\/span>(<\/span>y_train[<\/span>j]<\/span>-<\/span>sigmoid)<\/span>*<\/span>x_train[<\/span>j,<\/span>k]<\/span>+<\/span>2<\/span>*<\/span>Regular_coefficient*<\/span>weights[<\/span>k]<\/span>\n        #\u5e73\u5747\u6570<\/span>\n        b_g\/=<\/span>num\n        w_g\/=<\/span>num\n\n        #adagrad<\/span>\n        bg2_sum+=<\/span>b_g**<\/span>2<\/span>\n        wg2_sum+=<\/span>w_g**<\/span>2<\/span>\n        #\u66f4\u65b0w\u548cb<\/span>\n        weights-=<\/span>Learning_rate\/<\/span>wg2_sum**<\/span>0.5<\/span>*<\/span>w_g\n        bias-=<\/span>Learning_rate\/<\/span>bg2_sum**<\/span>0.5<\/span>*<\/span>b_g\n\n    # \u6bcf\u8bad\u7ec33\u8f6e\uff0c\u8f93\u51fa\u4e00\u6b21\u5728\u8bad\u7ec3\u96c6\u4e0a\u7684\u6b63\u786e\u7387<\/span>\n    # \u5728\u8ba1\u7b97loss\u65f6\uff0c\u7531\u4e8e\u6d89\u53cag()\u8fd0\u5230lo\u7b97\uff0c\u56e0\u6b64\u53ef\u80fd\u51fa\u73b0\u65e0\u7a77\u5927\uff0c\u8ba1\u7b97\u5e76\u6253\u5370\u51fa\u6765\u7684loss\u4e3anan<\/span>\n    # \u6709\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u628a\u4e0b\u9762\u6d89\u53ca\u5230loss\u8fd0\u7b97\u7684\u6ce8\u91ca\u53bb\u6389\uff0c\u89c2\u5bdf\u4e00\u6ce2\u6253\u5370\u51fa\u7684loss<\/span>\n        if<\/span> i%<\/span>3<\/span>==<\/span>0<\/span>:<\/span>\n            Correct_quantity=<\/span>0<\/span>\n            result=<\/span>np.<\/span>zeros(<\/span>num)<\/span>\n            #loss=0<\/span>\n            for<\/span> j in<\/span> range<\/span>(<\/span>num)<\/span>:<\/span>\n                z =<\/span> weights.<\/span>dot(<\/span>x_train[<\/span>j,<\/span> :<\/span>]<\/span>)<\/span> +<\/span> bias  # Z\u51fd\u6570\u8868\u8fbe\u5f0f<\/span>\n                sigmoid =<\/span> 1<\/span> \/<\/span> (<\/span>1<\/span> +<\/span> np.<\/span>exp(<\/span>-<\/span>z)<\/span>)<\/span>  # sigmoid function<\/span>\n                if<\/span> sigmoid>=<\/span>0.5<\/span>:<\/span>\n                    result[<\/span>j]<\/span>=<\/span>1<\/span>\n                else<\/span>:<\/span>\n                    result[<\/span>j]<\/span>=<\/span>0<\/span>\n                if<\/span> result[<\/span>j]<\/span>==<\/span>y_train[<\/span>j]<\/span>:<\/span>\n                    Correct_quantity+=<\/span>1.0<\/span>\n                #loss += (-1) * (y_train[j] * np.ln(sigmoid) + (1 - y_train[j]) * np.ln(1 - sigmoid))<\/span>\n            #print(f\"epoch{0},the loss on train data is::{1}\", i, loss \/ num)<\/span>\n            print<\/span>(<\/span>f\"epoch{0},the Correct rate on train data is:{1}\"<\/span>,<\/span>i,<\/span>Correct_quantity\/<\/span>num)<\/span>\n    return<\/span> weights,<\/span>bias\n\n#\u5bf9\u6c42\u51fa\u6765\u7684W\u548cb\u9a8c\u8bc1\u4e00\u4e0b\u6548\u679c<\/span>\ndef<\/span> validate<\/span>(<\/span>x_val,<\/span>y_val,<\/span>weights,<\/span>bias)<\/span>:<\/span>\n    num=<\/span>x_val.<\/span>shape[<\/span>0<\/span>]<\/span>\n    Correct_quantity =<\/span> 0<\/span>\n    result =<\/span> np.<\/span>zeros(<\/span>num)<\/span>\n    loss=<\/span>0<\/span>\n    for<\/span> j in<\/span> range<\/span>(<\/span>num)<\/span>:<\/span>\n        z =<\/span> weights.<\/span>dot(<\/span>x_val[<\/span>j,<\/span> :<\/span>]<\/span>)<\/span> +<\/span> bias  # Z\u51fd\u6570\u8868\u8fbe\u5f0f<\/span>\n        sigmoid =<\/span> 1<\/span> \/<\/span> (<\/span>1<\/span> +<\/span> np.<\/span>exp(<\/span>-<\/span>z)<\/span>)<\/span>  # sigmoid function<\/span>\n        if<\/span> sigmoid >=<\/span> 0.5<\/span>:<\/span>\n            result[<\/span>j]<\/span> =<\/span> 1<\/span>\n        if<\/span> sigmoid <<\/span> 0.5<\/span>:<\/span>\n            result[<\/span>j]<\/span> =<\/span> 0<\/span>\n        if<\/span> result[<\/span>j]<\/span> ==<\/span> y_val[<\/span>j]<\/span>:<\/span>\n            Correct_quantity +=<\/span> 1.0<\/span>\n        #\u9a8c\u8bc1\u96c6\u4e0a\u7684\u635f\u5931\u51fd\u6570<\/span>\n        #loss += (-1) * (y_val[j] * np.log(sigmoid) + (1 - y_val[j]) * np.ln(1 - sigmoid))<\/span>\n\n    return<\/span> Correct_quantity\/<\/span>num\n\n\ndef<\/span> main<\/span>(<\/span>)<\/span>:<\/span>\n    #\u6570\u636e\u7684\u9884\u5904\u7406<\/span>\n    df=<\/span>pd.<\/span>read_csv(<\/span>'spam_train.csv'<\/span>)<\/span>#\u8bfb\u6587\u4ef6<\/span>\n    df=<\/span>df.<\/span>fillna(<\/span>0<\/span>)<\/span>#\u7a7a\u503c\u75280\u586b\u5145<\/span>\n    array=<\/span>np.<\/span>array(<\/span>df)<\/span>#\u8f6c\u5316\u4e3a\u5bf9\u8c61\uff084000\uff0c49\uff09<\/span>\n    x=<\/span>array[<\/span>:<\/span>,<\/span>1<\/span>:<\/span>-<\/span>1<\/span>]<\/span>#\u629b\u5f03\u7b2c\u4e00\u5217\u548c\u6700\u540e\u4e00\u5217shape(4000,47)<\/span>\n    y=<\/span>array[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>#\u6700\u540e\u4e00\u5217label<\/span>\n    #\u5c06\u5012\u6570\u7b2c\u4e8c\u5217\u548c\u7b2c\u4e09\u5217\u9664\u4ee5\u5e73\u5747\u503c<\/span>\n    x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>=<\/span>x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>\/<\/span>np.<\/span>mean(<\/span>x[<\/span>:<\/span>,<\/span>-<\/span>1<\/span>]<\/span>)<\/span>\n    x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span> =<\/span> x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span> \/<\/span> np.<\/span>mean(<\/span>x[<\/span>:<\/span>,<\/span> -<\/span>2<\/span>]<\/span>)<\/span>\n\n    #\u5212\u5206\u6d4b\u8bd5\u96c6\u548c\u9a8c\u8bc1\u96c6<\/span>\n    x_train=<\/span>x[<\/span>0<\/span>:<\/span>3500<\/span>,<\/span>:<\/span>]<\/span>\n    y_train =<\/span> y[<\/span>0<\/span>:<\/span>3500<\/span>]<\/span>\n    x_val=<\/span>x[<\/span>3500<\/span>:<\/span>4001<\/span>,<\/span>:<\/span>]<\/span>\n    y_val=<\/span>y[<\/span>3500<\/span>:<\/span>4001<\/span>]<\/span>\n\n    #\u8fed\u4ee3\u6b21\u6570\u4e3a30\u6b21<\/span>\n    epoch=<\/span>30<\/span>\n    w,<\/span>b=<\/span>train(<\/span>x_train,<\/span>y_train,<\/span>epoch)<\/span>\n    #\u9a8c\u8bc1\u96c6\u4e0a\u7684\u7ed3\u679c<\/span>\n    Correct_rate=<\/span>validate(<\/span>x_val,<\/span>y_val,<\/span>w,<\/span>b)<\/span>\n    print<\/span>(<\/span>f\"The Correct rate on val data is:{0}\"<\/span>,<\/span>Correct_rate)<\/span>\n\nif<\/span> __name__ ==<\/span> '__main__'<\/span>:<\/span>\n    main(<\/span>)<\/span>\n<\/code><\/pre>\n
      3.2 \u7ed3\u679c\u663e\u793a<\/h5>\n

      \"\u674e\u5b8f\u6bc5\u673a\u5668\u5b66\u4e60\u4f5c\u4e1a2:Winner\u8fd8\u662fLosser\uff08\u542b\u8bad\u7ec3\u6570\u636e\uff09\u300c\u5efa\u8bae\u6536\u85cf\u300d
      \u53ef\u4ee5\u770b\u51fa\uff0c\u5728\u8bad\u7ec330\u8f6e\u540e\uff0c\u5206\u7c7b\u6b63\u786e\u7387\u80fd\u8fbe\u523094%\u5de6\u53f3\u3002<\/p>\n

      \u53c2\u8003\u8d44\u6599\uff1a<\/h4>\n
        \n
      • https:\/\/www.cnblogs.com\/HL-space\/p\/10785225.html<\/li>\n
      • http:\/\/www.luyixian.cn\/news_show_4755.aspx<\/li>\n
      • https:\/\/www.cnblogs.com\/luhuan\/p\/7925790.html<\/li>\n
      • https:\/\/blog.csdn.net\/u013541048\/article\/details\/81335256<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u674e\u5b8f\u6bc5\u673a\u5668\u5b66\u4e60\u4f5c\u4e1a2:Winner\u8fd8\u662fLosser\uff08\u542b\u8bad\u7ec3\u6570\u636e\uff09\u300c\u5efa\u8bae\u6536\u85cf\u300d\u8bad\u7ec3\u6570\u636e\u4ee5\u53ca\u6e90\u4ee3\u7801\u5728\u6211\u7684Github\uff1ahttps:\/\/github.com\/taw1...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8894"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=8894"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8894\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=8894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=8894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=8894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}