{"id":9055,"date":"2024-05-16T07:01:01","date_gmt":"2024-05-15T23:01:01","guid":{"rendered":""},"modified":"2024-05-16T07:01:01","modified_gmt":"2024-05-15T23:01:01","slug":"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7","status":"publish","type":"post","link":"https:\/\/mushiming.com\/9055.html","title":{"rendered":"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7"},"content":{"rendered":"

\u5f15\u8a00\uff1a<\/p>\n

\u673a\u5668\u5b66\u4e60\u548c\u6df1\u5ea6\u5b66\u4e60\u7684\u5e7f\u6cdb\u5e94\u7528\uff0c\u4eba\u4eec\u5bf9\u56de\u5f52\u9884\u6d4b\/\u5206\u7c7b\u9884\u6d4b\u7684\u7ed3\u679c\u8bc4\u4f30\u7684\u91cd\u89c6\uff0c\u4e3a\u6b64\u603b\u7ed3\u4e86\u4e94\u79cd\u5e38\u7528\u7684\u6a21\u578b\u7ed3\u679c\u8bc4\u4f30\u65b9\u6cd5\uff0c\u5e76\u7b80\u8981\u505a\u4e00\u4e9b\u8bf4\u660e\uff0cRMSE\u3001MAE\u3001Accuracy\u3001R2\u3001var\u7b49\u4e94\u79cd\u8bc4\u4f30\u65b9\u6cd5\uff0c\u5176\u4e2d\u7cbe\u5ea6\u4e00\u822c\u7528\u4e8e\u5206\u7c7b\u9884\u6d4b\u4e0a\uff0c\u4f46\u662f\uff0c\u4e5f\u53ef\u4ee5\u7528\u4e8e\u56de\u5f52\u9884\u6d4b\u8bc4\u4f30\u4e0a\u3002<\/p>\n

    \n
  1. \u5747\u65b9\u6839\u8bef\u5dee\uff1a\"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/li>\n<\/ol>\n

    \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

     <\/p>\n

    (2) \u5747\u65b9\u8bef\u5dee\uff1a\"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    (3) \u7cbe\u5ea6\uff1a\"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    (4) \u51b3\u5b9a\u7cfb\u6570: \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    (5) \u89e3\u91ca\u65b9\u5dee\u5f97\u5206:\"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    \"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7<\/p>\n

    RMSE \u548c MAE \u7528\u6765\u8bc4\u4f30\u9884\u6d4b\u8bef\u5dee\uff1a\u5176\u503c\u8d8a\u5c0f\u8d8a\u597d\u3002\u7cbe\u5ea6\u8861\u91cf\u9884\u6d4b\u7ed3\u679c\u7684\u7cbe\u5ea6\uff1a\u8d8a\u5927\u8d8a\u597d\u3002 R2 \u548cvar\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\uff0c\u8bc4\u4f30\u9884\u6d4b\u7ed3\u679c\u5bf9\u771f\u5b9e\u6570\u636e\u7684\u8868\u8fbe\u80fd\u529b\uff0c\u8d8a\u5927\u8d8a\u597d\u3002R\u8d8a\u5927\u8868\u793a\u6211\u4eec\u7684\u6a21\u578b\u6548\u679c\u8d8a\u597d\uff0c\u6700\u5927\u503c\u4e3a1\u3002\u5176\u4e2d\uff0c<\/p>\n

    R=1\uff1a\u8868\u660e\u9884\u6d4b\u5341\u5206\u51c6\u786e\uff0c\u6ca1\u6709\u4efb\u4f55\u9519\u8bef<\/p>\n

    R=0\uff1a\u8868\u660e\u6a21\u578b\u7684\u6548\u679c\u5f88\u5dee<\/p>\n

    R<0\uff1a\u8868\u660e\u6570\u636e\u4e4b\u95f4\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb<\/p>\n

    \u6700\u540e\u9644\u4e0a\u5c01\u88c5\u51fd\u6570\uff1a<\/p>\n

    from sklearn.metrics import mean_squared_error,mean_absolute_error\nimport numpy.linalg as la\nimport math\n#\u6a21\u578b\u8bc4\u4f30\ndef evaluation(a,b):\n    '''\n    a,b\u4e3a\u771f\u503c\u548c\u9884\u6d4b\u503c\n    '''\n    rmse = math.sqrt(mean_squared_error(a,b))#\u5747\u65b9\u8bef\u5dee\n    mae = mean_absolute_error(a, b)#\u7edd\u5bf9\u8bef\u5dee\n    F_norm = la.norm(a-b)\/la.norm(a)\n    r2 = 1-((a-b)**2).sum()\/((a-a.mean())**2).sum()\n    var = 1-(np.var(a - b))\/np.var(a)\n    return rmse, mae, 1-F_norm, r2, var <\/code><\/pre>\n

     <\/p>\n","protected":false},"excerpt":{"rendered":"\u673a\u5668\u5b66\u4e60\u5e38\u7528\u7684\u4e94\u79cd\u9884\u6d4b\u7ed3\u679c\u8bc4\u4ef7\u5f15\u8a00\uff1a\u673a\u5668\u5b66\u4e60\u548c\u6df1\u5ea6\u5b66\u4e60\u7684\u5e7f\u6cdb\u5e94\u7528\uff0c\u4eba\u4eec\u5bf9\u56de\u5f52\u9884\u6d4b\/\u5206\u7c7b\u9884\u6d4b\u7684\u7ed3\u679c\u8bc4\u4f30\u7684\u91cd\u89c6\uff0c\u4e3a\u6b64\u603b\u7ed3\u4e86...","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\/9055"}],"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=9055"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/9055\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=9055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=9055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=9055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}