{"id":15,"date":"2023-07-21T16:43:53","date_gmt":"2023-07-21T08:43:53","guid":{"rendered":"http:\/\/lingbo.online\/?p=15"},"modified":"2023-08-17T17:35:41","modified_gmt":"2023-08-17T09:35:41","slug":"lightgbm_theory","status":"publish","type":"post","link":"https:\/\/lingbo.online\/index.php\/algorithm_learning\/lightgbm_theory\/","title":{"rendered":"LightGBM\u7b97\u6cd5\u7406\u8bba"},"content":{"rendered":"\n\n\n<h3 class=\"wp-block-heading\">1. LightGBM\u7b80\u4ecb<\/h3>\n\n\n\n<p>GBDT (Gradient Boosting Decision Tree) \u662f\u673a\u5668\u5b66\u4e60\u4e2d\u4e00\u4e2a\u957f\u76db\u4e0d\u8870\u7684\u6a21\u578b\uff0c\u5176\u4e3b\u8981\u601d\u60f3\u662f\u5229\u7528\u5f31\u5206\u7c7b\u5668\uff08\u51b3\u7b56\u6811\uff09\u8fed\u4ee3\u8bad\u7ec3\u4ee5\u5f97\u5230\u6700\u4f18\u6a21\u578b\uff0c\u8be5\u6a21\u578b\u5177\u6709\u8bad\u7ec3\u6548\u679c\u597d\u3001\u4e0d\u6613\u8fc7\u62df\u5408\u7b49\u4f18\u70b9\u3002GBDT\u4e0d\u4ec5\u5728\u5de5\u4e1a\u754c\u5e94\u7528\u5e7f\u6cdb\uff0c\u901a\u5e38\u88ab\u7528\u4e8e\u591a\u5206\u7c7b\u3001\u70b9\u51fb\u7387\u9884\u6d4b\u3001\u641c\u7d22\u6392\u5e8f\u7b49\u4efb\u52a1\uff1b\u5728\u5404\u79cd\u6570\u636e\u6316\u6398\u7ade\u8d5b\u4e2d\u4e5f\u662f\u81f4\u547d\u6b66\u5668\uff0c\u636e\u7edf\u8ba1Kaggle\u4e0a\u7684\u6bd4\u8d5b\u6709\u4e00\u534a\u4ee5\u4e0a\u7684\u51a0\u519b\u65b9\u6848\u90fd\u662f\u57fa\u4e8eGBDT\u3002\u800cLightGBM\uff08Light Gradient Boosting Machine\uff09\u662f\u4e00\u4e2a\u5b9e\u73b0GBDT\u7b97\u6cd5\u7684\u6846\u67b6\uff0c\u652f\u6301\u9ad8\u6548\u7387\u7684\u5e76\u884c\u8bad\u7ec3\uff0c\u5e76\u4e14\u5177\u6709\u66f4\u5feb\u7684\u8bad\u7ec3\u901f\u5ea6\u3001\u66f4\u4f4e\u7684\u5185\u5b58\u6d88\u8017\u3001\u66f4\u597d\u7684\u51c6\u786e\u7387\u3001\u652f\u6301\u5206\u5e03\u5f0f\u53ef\u4ee5\u5feb\u901f\u5904\u7406\u6d77\u91cf\u6570\u636e\u7b49\u4f18\u70b9\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.1 LightGBM\u63d0\u51fa\u7684\u52a8\u673a<\/h4>\n\n\n\n<p>\u5e38\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u4f8b\u5982\u795e\u7ecf\u7f51\u7edc\u7b49\u7b97\u6cd5\uff0c\u90fd\u53ef\u4ee5\u4ee5mini-batch\u7684\u65b9\u5f0f\u8bad\u7ec3\uff0c\u8bad\u7ec3\u6570\u636e\u7684\u5927\u5c0f\u4e0d\u4f1a\u53d7\u5230\u5185\u5b58\u9650\u5236\u3002\u800cGBDT\u5728\u6bcf\u4e00\u6b21\u8fed\u4ee3\u7684\u65f6\u5019\uff0c\u90fd\u9700\u8981\u904d\u5386\u6574\u4e2a\u8bad\u7ec3\u6570\u636e\u591a\u6b21\u3002\u5982\u679c\u628a\u6574\u4e2a\u8bad\u7ec3\u6570\u636e\u88c5\u8fdb\u5185\u5b58\u5219\u4f1a\u9650\u5236\u8bad\u7ec3\u6570\u636e\u7684\u5927\u5c0f\uff1b\u5982\u679c\u4e0d\u88c5\u8fdb\u5185\u5b58\uff0c\u53cd\u590d\u5730\u8bfb\u5199\u8bad\u7ec3\u6570\u636e\u53c8\u4f1a\u6d88\u8017\u975e\u5e38\u5927\u7684\u65f6\u95f4\u3002\u5c24\u5176\u9762\u5bf9\u5de5\u4e1a\u7ea7\u6d77\u91cf\u7684\u6570\u636e\uff0c\u666e\u901a\u7684GBDT\u7b97\u6cd5\u662f\u4e0d\u80fd\u6ee1\u8db3\u5176\u9700\u6c42\u7684\u3002<\/p>\n\n\n\n<p>LightGBM\u63d0\u51fa\u7684\u4e3b\u8981\u539f\u56e0\u5c31\u662f\u4e3a\u4e86\u89e3\u51b3GBDT\u5728\u6d77\u91cf\u6570\u636e\u9047\u5230\u7684\u95ee\u9898\uff0c\u8ba9GBDT\u53ef\u4ee5\u66f4\u597d\u66f4\u5feb\u5730\u7528\u4e8e\u5de5\u4e1a\u5b9e\u8df5\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.2 XGBoost\u7684\u7f3a\u70b9\u53caLightGBM\u7684\u4f18\u5316<\/h4>\n\n\n\n<p><strong>\uff081\uff09XGBoost\u7684\u7f3a\u70b9<\/strong><\/p>\n\n\n\n<p>\u5728LightGBM\u63d0\u51fa\u4e4b\u524d\uff0c\u6700\u6709\u540d\u7684GBDT\u5de5\u5177\u5c31\u662fXGBoost\u4e86\uff0c\u5b83\u662f\u57fa\u4e8e\u9884\u6392\u5e8f\u65b9\u6cd5\u7684\u51b3\u7b56\u6811\u7b97\u6cd5\u3002\u8fd9\u79cd\u6784\u5efa\u51b3\u7b56\u6811\u7684\u7b97\u6cd5\u57fa\u672c\u601d\u60f3\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\uff0c\u5bf9\u6240\u6709\u7279\u5f81\u90fd\u6309\u7167\u7279\u5f81\u7684\u6570\u503c\u8fdb\u884c\u9884\u6392\u5e8f\u3002<\/li>\n\n\n\n<li>\u5176\u6b21\uff0c\u5728\u904d\u5386\u5206\u5272\u70b9\u7684\u65f6\u5019\u7528O(#data)\u7684\u4ee3\u4ef7\u627e\u5230\u4e00\u4e2a\u7279\u5f81\u4e0a\u7684\u6700\u597d\u5206\u5272\u70b9\u3002<\/li>\n\n\n\n<li>\u6700\u540e\uff0c\u5728\u627e\u5230\u4e00\u4e2a\u7279\u5f81\u7684\u6700\u597d\u5206\u5272\u70b9\u540e\uff0c\u5c06\u6570\u636e\u5206\u88c2\u6210\u5de6\u53f3\u5b50\u8282\u70b9\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u6837\u7684\u9884\u6392\u5e8f\u7b97\u6cd5\u7684\u4f18\u70b9\u662f\u80fd\u7cbe\u786e\u5730\u627e\u5230\u5206\u5272\u70b9\u3002\u4f46\u662f\u7f3a\u70b9\u4e5f\u5f88\u660e\u663e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\uff0c\u7a7a\u95f4\u6d88\u8017\u5927\u3002\u8fd9\u6837\u7684\u7b97\u6cd5\u9700\u8981\u4fdd\u5b58\u6570\u636e\u7684\u7279\u5f81\u503c\uff0c\u8fd8\u4fdd\u5b58\u4e86\u7279\u5f81\u6392\u5e8f\u7684\u7ed3\u679c\uff08\u4f8b\u5982\uff0c\u4e3a\u4e86\u540e\u7eed\u5feb\u901f\u7684\u8ba1\u7b97\u5206\u5272\u70b9\uff0c\u4fdd\u5b58\u4e86\u6392\u5e8f\u540e\u7684\u7d22\u5f15\uff09\uff0c\u8fd9\u5c31\u9700\u8981\u6d88\u8017\u8bad\u7ec3\u6570\u636e\u4e24\u500d\u7684\u5185\u5b58\u3002<\/li>\n\n\n\n<li>\u5176\u6b21\uff0c\u65f6\u95f4\u4e0a\u4e5f\u6709\u8f83\u5927\u7684\u5f00\u9500\uff0c\u5728\u904d\u5386\u6bcf\u4e00\u4e2a\u5206\u5272\u70b9\u7684\u65f6\u5019\uff0c\u90fd\u9700\u8981\u8fdb\u884c\u5206\u88c2\u589e\u76ca\u7684\u8ba1\u7b97\uff0c\u6d88\u8017\u7684\u4ee3\u4ef7\u5927\u3002<\/li>\n\n\n\n<li>\u6700\u540e\uff0c\u5bf9cache\u4f18\u5316\u4e0d\u53cb\u597d\u3002\u5728\u9884\u6392\u5e8f\u540e\uff0c\u7279\u5f81\u5bf9\u68af\u5ea6\u7684\u8bbf\u95ee\u662f\u4e00\u79cd\u968f\u673a\u8bbf\u95ee\uff0c\u5e76\u4e14\u4e0d\u540c\u7684\u7279\u5f81\u8bbf\u95ee\u7684\u987a\u5e8f\u4e0d\u4e00\u6837\uff0c\u65e0\u6cd5\u5bf9cache\u8fdb\u884c\u4f18\u5316\u3002\u540c\u65f6\uff0c\u5728\u6bcf\u4e00\u5c42\u957f\u6811\u7684\u65f6\u5019\uff0c\u9700\u8981\u968f\u673a\u8bbf\u95ee\u4e00\u4e2a\u884c\u7d22\u5f15\u5230\u53f6\u5b50\u7d22\u5f15\u7684\u6570\u7ec4\uff0c\u5e76\u4e14\u4e0d\u540c\u7279\u5f81\u8bbf\u95ee\u7684\u987a\u5e8f\u4e5f\u4e0d\u4e00\u6837\uff0c\u4e5f\u4f1a\u9020\u6210\u8f83\u5927\u7684cache miss\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\uff082\uff09LightGBM\u7684\u4f18\u5316<\/strong><\/p>\n\n\n\n<p>\u4e3a\u4e86\u907f\u514d\u4e0a\u8ff0XGBoost\u7684\u7f3a\u9677\uff0c\u5e76\u4e14\u80fd\u591f\u5728\u4e0d\u635f\u5bb3\u51c6\u786e\u7387\u7684\u6761\u4ef6\u4e0b\u52a0\u5febGBDT\u6a21\u578b\u7684\u8bad\u7ec3\u901f\u5ea6\uff0clightGBM\u5728\u4f20\u7edf\u7684GBDT\u7b97\u6cd5\u4e0a\u8fdb\u884c\u4e86\u5982\u4e0b\u4f18\u5316\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u57fa\u4e8eHistogram\u7684\u51b3\u7b56\u6811\u7b97\u6cd5<\/strong>\u3002<\/li>\n\n\n\n<li><strong>\u5355\u8fb9\u68af\u5ea6\u91c7\u6837 Gradient-based One-Side Sampling(GOSS)<\/strong>\uff1a\u4f7f\u7528GOSS\u53ef\u4ee5\u51cf\u5c11\u5927\u91cf\u53ea\u5177\u6709\u5c0f\u68af\u5ea6\u7684\u6570\u636e\u5b9e\u4f8b\uff0c\u8fd9\u6837\u5728\u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\u7684\u65f6\u5019\u53ea\u5229\u7528\u5269\u4e0b\u7684\u5177\u6709\u9ad8\u68af\u5ea6\u7684\u6570\u636e\u5c31\u53ef\u4ee5\u4e86\uff0c\u76f8\u6bd4XGBoost\u904d\u5386\u6240\u6709\u7279\u5f81\u503c\u8282\u7701\u4e86\u4e0d\u5c11\u65f6\u95f4\u548c\u7a7a\u95f4\u4e0a\u7684\u5f00\u9500\u3002<\/li>\n\n\n\n<li><strong>\u4e92\u65a5\u7279\u5f81\u6346\u7ed1 Exclusive Feature Bundling(EFB)<\/strong>\uff1a\u4f7f\u7528EFB\u53ef\u4ee5\u5c06\u8bb8\u591a\u4e92\u65a5\u7684\u7279\u5f81\u7ed1\u5b9a\u4e3a\u4e00\u4e2a\u7279\u5f81\uff0c\u8fd9\u6837\u8fbe\u5230\u4e86\u964d\u7ef4\u7684\u76ee\u7684\u3002<\/li>\n\n\n\n<li><strong>\u5e26\u6df1\u5ea6\u9650\u5236\u7684Leaf-wise\u7684\u53f6\u5b50\u751f\u957f\u7b56\u7565<\/strong>\uff1a\u5927\u591a\u6570GBDT\u5de5\u5177\u4f7f\u7528\u4f4e\u6548\u7684\u6309\u5c42\u751f\u957f (level-wise)\u7684\u51b3\u7b56\u6811\u751f\u957f\u7b56\u7565\uff0c\u56e0\u4e3a\u5b83\u4e0d\u52a0\u533a\u5206\u7684\u5bf9\u5f85\u540c\u4e00\u5c42\u7684\u53f6\u5b50\uff0c\u5e26\u6765\u4e86\u5f88\u591a\u6ca1\u5fc5\u8981\u7684\u5f00\u9500\u3002\u5b9e\u9645\u4e0a\u5f88\u591a\u53f6\u5b50\u7684\u5206\u88c2\u589e\u76ca\u8f83\u4f4e\uff0c\u6ca1\u5fc5\u8981\u8fdb\u884c\u641c\u7d22\u548c\u5206\u88c2\u3002LightGBM\u4f7f\u7528\u4e86\u5e26\u6709\u6df1\u5ea6\u9650\u5236\u7684\u6309\u53f6\u5b50\u751f\u957f (leaf-wise) \u7b97\u6cd5\u3002<\/li>\n\n\n\n<li><strong>\u76f4\u63a5\u652f\u6301\u7c7b\u522b\u7279\u5f81(Categorical Feature)<\/strong><\/li>\n\n\n\n<li><strong>\u652f\u6301\u9ad8\u6548\u5e76\u884c<\/strong><\/li>\n\n\n\n<li><strong>Cache\u547d\u4e2d\u7387\u4f18\u5316<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u5c31\u8be6\u7ec6\u4ecb\u7ecd\u4ee5\u4e0a\u63d0\u5230\u7684lightGBM\u4f18\u5316\u7b97\u6cd5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. LightGBM\u7684\u57fa\u672c\u539f\u7406<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 \u57fa\u4e8eHistogram\u7684\u51b3\u7b56\u6811\u7b97\u6cd5<\/h4>\n\n\n\n<p><strong>\uff081\uff09\u76f4\u65b9\u56fe\u7b97\u6cd5<\/strong><\/p>\n\n\n\n<p>Histogram algorithm\u76f4\u8bd1\u4e3a\u76f4\u65b9\u56fe\u7b97\u6cd5\uff0c\u57fa\u672c\u601d\u60f3\u662f\uff1a\u5148\u628a\u8fde\u7eed\u7684\u6d6e\u70b9\u7279\u5f81\u503c\u79bb\u6563\u5316\u6210K KK\u4e2a\u6574\u6570\uff0c\u540c\u65f6\u6784\u9020\u4e00\u4e2a\u5bbd\u5ea6\u4e3aK KK\u7684\u76f4\u65b9\u56fe\u3002\u5728\u904d\u5386\u6570\u636e\u7684\u65f6\u5019\uff0c\u6839\u636e\u79bb\u6563\u5316\u540e\u7684\u503c\u4f5c\u4e3a\u7d22\u5f15\u5728\u76f4\u65b9\u56fe\u4e2d\u7d2f\u79ef\u7edf\u8ba1\u91cf\uff0c\u5f53\u904d\u5386\u4e00\u6b21\u6570\u636e\u540e\uff0c\u76f4\u65b9\u56fe\u7d2f\u79ef\u4e86\u9700\u8981\u7684\u7edf\u8ba1\u91cf\uff0c\u7136\u540e\u6839\u636e\u76f4\u65b9\u56fe\u7684\u79bb\u6563\u503c\uff0c\u904d\u5386\u5bfb\u627e\u6700\u4f18\u7684\u5206\u5272\u70b9\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"253\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613153602677.png\" alt=\"\" class=\"wp-image-14\" srcset=\"http:\/\/youpaiyun.lingbo.online\/2023\/07\/20200613153602677.png 557w, http:\/\/youpaiyun.lingbo.online\/2023\/07\/20200613153602677-300x136.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/figure>\n<\/div>\n\n\n<p>\u76f4\u65b9\u56fe\u7b97\u6cd5\u7b80\u5355\u7406\u89e3\u4e3a\uff1a\u9996\u5148\u786e\u5b9a\u5bf9\u4e8e\u6bcf\u4e00\u4e2a\u7279\u5f81\u9700\u8981\u591a\u5c11\u4e2a\u7bb1\u5b50\uff08bin\uff09\u5e76\u4e3a\u6bcf\u4e00\u4e2a\u7bb1\u5b50\u5206\u914d\u4e00\u4e2a\u6574\u6570\uff1b\u7136\u540e\u5c06\u6d6e\u70b9\u6570\u7684\u8303\u56f4\u5747\u5206\u6210\u82e5\u5e72\u533a\u95f4\uff0c\u533a\u95f4\u4e2a\u6570\u4e0e\u7bb1\u5b50\u4e2a\u6570\u76f8\u7b49\uff0c\u5c06\u5c5e\u4e8e\u8be5\u7bb1\u5b50\u7684\u6837\u672c\u6570\u636e\u66f4\u65b0\u4e3a\u7bb1\u5b50\u7684\u503c\uff1b\u6700\u540e\u7528\u76f4\u65b9\u56fe\uff08#bins\uff09\u8868\u793a\u3002\u770b\u8d77\u6765\u5f88\u9ad8\u5927\u4e0a\uff0c\u5176\u5b9e\u5c31\u662f\u76f4\u65b9\u56fe\u7edf\u8ba1\uff0c\u5c06\u5927\u89c4\u6a21\u7684\u6570\u636e\u653e\u5728\u4e86\u76f4\u65b9\u56fe\u4e2d\u3002<\/p>\n\n\n\n<p>\u7279\u5f81\u79bb\u6563\u5316\u5177\u6709\u5f88\u591a\u4f18\u70b9\uff0c\u5982\u5b58\u50a8\u65b9\u4fbf\u3001\u8fd0\u7b97\u66f4\u5feb\u3001\u9c81\u68d2\u6027\u5f3a\u3001\u6a21\u578b\u66f4\u52a0\u7a33\u5b9a\u7b49\u3002\u5bf9\u4e8e\u76f4\u65b9\u56fe\u7b97\u6cd5\u6765\u8bf4\u6700\u76f4\u63a5\u7684\u6709\u4ee5\u4e0b\u4e24\u4e2a\u4f18\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5185\u5b58\u5360\u7528\u66f4\u5c0f\uff1a<\/strong>\u76f4\u65b9\u56fe\u7b97\u6cd5\u4e0d\u4ec5\u4e0d\u9700\u8981\u989d\u5916\u5b58\u50a8\u9884\u6392\u5e8f\u7684\u7ed3\u679c\uff0c\u800c\u4e14\u53ef\u4ee5\u53ea\u4fdd\u5b58\u7279\u5f81\u79bb\u6563\u5316\u540e\u7684\u503c\uff0c\u800c\u8fd9\u4e2a\u503c\u4e00\u822c\u75288\u4f4d\u6574\u578b\u5b58\u50a8\u5c31\u8db3\u591f\u4e86\uff0c\u5185\u5b58\u6d88\u8017\u53ef\u4ee5\u964d\u4f4e\u4e3a\u539f\u6765\u76841\/8\u3002\u4e5f\u5c31\u662f\u8bf4XGBoost\u9700\u8981\u752832\u4f4d\u7684\u6d6e\u70b9\u6570\u53bb\u5b58\u50a8\u7279\u5f81\u503c\uff0c\u5e76\u75288\u4f4d\u7684\u6574\u5f62\u53bb\u5b58\u50a8\u7d22\u5f15\uff0c\u800cLightGBM\u53ea\u9700\u8981\u75288\u4f4d\u53bb\u5b58\u50a8\u76f4\u65b9\u56fe\uff0c\u5185\u5b58\u76f8\u5f53\u4e8e\u51cf\u5c11\u4e3a1\/8\uff1b<\/li>\n\n\n\n<li><strong>\u8ba1\u7b97\u4ee3\u4ef7\u66f4\u5c0f\uff1a<\/strong>\u9884\u6392\u5e8f\u7b97\u6cd5XGBoost\u6bcf\u904d\u5386\u4e00\u4e2a\u7279\u5f81\u503c\u5c31\u9700\u8981\u8ba1\u7b97\u4e00\u6b21\u5206\u88c2\u7684\u589e\u76ca\uff0c\u800c\u76f4\u65b9\u56fe \u7b97\u6cd5LightGBM\u53ea\u9700\u8981\u8ba1\u7b97k\u6b21\uff08k\u53ef\u4ee5\u8ba4\u4e3a\u662f\u5e38\u6570\uff09\uff0c\u76f4\u63a5\u5c06\u65f6\u95f4\u590d\u6742\u5ea6\u4eceO(#data*#feature)\u964d\u4f4e\u5230O(#k*#feature),\u663e\u7136#data&gt;&gt;#k<\/li>\n<\/ul>\n\n\n\n<p>\u5f53\u7136\uff0cHistogram\u7b97\u6cd5\u5e76\u4e0d\u662f\u5b8c\u7f8e\u7684\u3002\u7531\u4e8e\u7279\u5f81\u88ab\u79bb\u6563\u5316\u540e\uff0c\u627e\u5230\u7684\u5e76\u4e0d\u662f\u5f88\u7cbe\u786e\u7684\u5206\u5272\u70b9\uff0c\u6240\u4ee5\u4f1a\u5bf9\u7ed3\u679c\u4ea7\u751f\u5f71\u54cd\u3002\u4f46\u5728\u4e0d\u540c\u7684\u6570\u636e\u96c6\u4e0a\u7684\u7ed3\u679c\u8868\u660e\uff0c\u79bb\u6563\u5316\u7684\u5206\u5272\u70b9\u5bf9\u6700\u7ec8\u7684\u7cbe\u5ea6\u5f71\u54cd\u5e76\u4e0d\u662f\u5f88\u5927\uff0c\u751a\u81f3\u6709\u65f6\u5019\u4f1a\u66f4\u597d\u4e00\u70b9\u3002\u539f\u56e0\u662f\u51b3\u7b56\u6811\u672c\u6765\u5c31\u662f\u5f31\u6a21\u578b\uff0c\u5206\u5272\u70b9\u662f\u4e0d\u662f\u7cbe\u786e\u5e76\u4e0d\u662f\u592a\u91cd\u8981\uff1b\u8f83\u7c97\u7684\u5206\u5272\u70b9\u4e5f\u6709\u6b63\u5219\u5316\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u9632\u6b62\u8fc7\u62df\u5408\uff1b\u5373\u4f7f\u5355\u68f5\u6811\u7684\u8bad\u7ec3\u8bef\u5dee\u6bd4\u7cbe\u786e\u5206\u5272\u7684\u7b97\u6cd5\u7a0d\u5927\uff0c\u4f46\u5728\u68af\u5ea6\u63d0\u5347\uff08Gradient Boosting\uff09\u7684\u6846\u67b6\u4e0b\u6ca1\u6709\u592a\u5927\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p><strong>\uff082\uff09\u76f4\u65b9\u56fe\u505a\u5dee\u52a0\u901f<\/strong><\/p>\n\n\n\n<p>LightGBM\u53e6\u4e00\u4e2a\u4f18\u5316\u662fHistogram\uff08\u76f4\u65b9\u56fe\uff09\u505a\u5dee\u52a0\u901f\u3002\u4e00\u4e2a\u53f6\u5b50\u7684\u76f4\u65b9\u56fe\u53ef\u4ee5\u7531\u5b83\u7684\u7236\u4eb2\u8282\u70b9\u7684\u76f4\u65b9\u56fe\u4e0e\u5b83\u5144\u5f1f\u7684\u76f4\u65b9\u56fe\u505a\u5dee\u5f97\u5230\uff0c\u5728\u901f\u5ea6\u4e0a\u53ef\u4ee5\u63d0\u5347\u4e00\u500d\u3002\u901a\u5e38\u6784\u9020\u76f4\u65b9\u56fe\u65f6\uff0c\u9700\u8981\u904d\u5386\u8be5\u53f6\u5b50\u4e0a\u7684\u6240\u6709\u6570\u636e\uff0c\u4f46\u76f4\u65b9\u56fe\u505a\u5dee\u4ec5\u9700\u904d\u5386\u76f4\u65b9\u56fe\u7684k\u4e2a\u6876\u3002\u5728\u5b9e\u9645\u6784\u5efa\u6811\u7684\u8fc7\u7a0b\u4e2d\uff0cLightGBM\u8fd8\u53ef\u4ee5\u5148\u8ba1\u7b97\u76f4\u65b9\u56fe\u5c0f\u7684\u53f6\u5b50\u8282\u70b9\uff0c\u7136\u540e\u5229\u7528\u76f4\u65b9\u56fe\u505a\u5dee\u6765\u83b7\u5f97\u76f4\u65b9\u56fe\u5927\u7684\u53f6\u5b50\u8282\u70b9\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u7528\u975e\u5e38\u5fae\u5c0f\u7684\u4ee3\u4ef7\u5f97\u5230\u5b83\u5144\u5f1f\u53f6\u5b50\u7684\u76f4\u65b9\u56fe\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613154447800.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p>\u6ce8\u610f\uff1aXGBoost \u5728\u8fdb\u884c\u9884\u6392\u5e8f\u65f6\u53ea\u8003\u8651\u975e\u96f6\u503c\u8fdb\u884c\u52a0\u901f\uff0c\u800c LightGBM \u4e5f\u91c7\u7528\u7c7b\u4f3c\u7b56\u7565\uff1a\u53ea\u7528\u975e\u96f6\u7279\u5f81\u6784\u5efa\u76f4\u65b9\u56fe\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 \u5e26\u6df1\u5ea6\u9650\u5236\u7684 Leaf-wise \u7b97\u6cd5<\/h3>\n\n\n\n<p>\u5728Histogram\u7b97\u6cd5\u4e4b\u4e0a\uff0cLightGBM\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u4f18\u5316\u3002\u9996\u5148\u5b83\u629b\u5f03\u4e86\u5927\u591a\u6570GBDT\u5de5\u5177\u4f7f\u7528\u7684\u6309\u5c42\u751f\u957f (level-wise) \u7684\u51b3\u7b56\u6811\u751f\u957f\u7b56\u7565\uff0c\u800c\u4f7f\u7528\u4e86\u5e26\u6709\u6df1\u5ea6\u9650\u5236\u7684\u6309\u53f6\u5b50\u751f\u957f (leaf-wise) \u7b97\u6cd5\u3002<\/p>\n\n\n\n<p>XGBoost \u91c7\u7528 Level-wise \u7684\u589e\u957f\u7b56\u7565\uff0c\u8be5\u7b56\u7565\u904d\u5386\u4e00\u6b21\u6570\u636e\u53ef\u4ee5\u540c\u65f6\u5206\u88c2\u540c\u4e00\u5c42\u7684\u53f6\u5b50\uff0c\u5bb9\u6613\u8fdb\u884c\u591a\u7ebf\u7a0b\u4f18\u5316\uff0c\u4e5f\u597d\u63a7\u5236\u6a21\u578b\u590d\u6742\u5ea6\uff0c\u4e0d\u5bb9\u6613\u8fc7\u62df\u5408\u3002\u4f46\u5b9e\u9645\u4e0aLevel-wise\u662f\u4e00\u79cd\u4f4e\u6548\u7684\u7b97\u6cd5\uff0c\u56e0\u4e3a\u5b83\u4e0d\u52a0\u533a\u5206\u7684\u5bf9\u5f85\u540c\u4e00\u5c42\u7684\u53f6\u5b50\uff0c\u5b9e\u9645\u4e0a\u5f88\u591a\u53f6\u5b50\u7684\u5206\u88c2\u589e\u76ca\u8f83\u4f4e\uff0c\u6ca1\u5fc5\u8981\u8fdb\u884c\u641c\u7d22\u548c\u5206\u88c2\uff0c\u56e0\u6b64\u5e26\u6765\u4e86\u5f88\u591a\u6ca1\u5fc5\u8981\u7684\u8ba1\u7b97\u5f00\u9500\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613154930612.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p>LightGBM\u91c7\u7528Leaf-wise\u7684\u589e\u957f\u7b56\u7565\uff0c\u8be5\u7b56\u7565\u6bcf\u6b21\u4ece\u5f53\u524d\u6240\u6709\u53f6\u5b50\u4e2d\uff0c\u627e\u5230\u5206\u88c2\u589e\u76ca\u6700\u5927\u7684\u4e00\u4e2a\u53f6\u5b50\uff0c\u7136\u540e\u5206\u88c2\uff0c\u5982\u6b64\u5faa\u73af\u3002\u56e0\u6b64\u540cLevel-wise\u76f8\u6bd4\uff0cLeaf-wise\u7684\u4f18\u70b9\u662f\uff1a\u5728\u5206\u88c2\u6b21\u6570\u76f8\u540c\u7684\u60c5\u51b5\u4e0b\uff0cLeaf-wise\u53ef\u4ee5\u964d\u4f4e\u66f4\u591a\u7684\u8bef\u5dee\uff0c\u5f97\u5230\u66f4\u597d\u7684\u7cbe\u5ea6\uff1bLeaf-wise\u7684\u7f3a\u70b9\u662f\uff1a\u53ef\u80fd\u4f1a\u957f\u51fa\u6bd4\u8f83\u6df1\u7684\u51b3\u7b56\u6811\uff0c\u4ea7\u751f\u8fc7\u62df\u5408\u3002\u56e0\u6b64LightGBM\u4f1a\u5728Leaf-wise\u4e4b\u4e0a\u589e\u52a0\u4e86\u4e00\u4e2a\u6700\u5927\u6df1\u5ea6\u7684\u9650\u5236\uff0c\u5728\u4fdd\u8bc1\u9ad8\u6548\u7387\u7684\u540c\u65f6\u9632\u6b62\u8fc7\u62df\u5408\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/2020061315494579.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">2.3 \u5355\u8fb9\u68af\u5ea6\u91c7\u6837\u7b97\u6cd5<\/h4>\n\n\n\n<p>Gradient-based One-Side Sampling \u5e94\u8be5\u88ab\u7ffb\u8bd1\u4e3a\u5355\u8fb9\u68af\u5ea6\u91c7\u6837\uff08GOSS\uff09\u3002GOSS\u7b97\u6cd5\u4ece\u51cf\u5c11\u6837\u672c\u7684\u89d2\u5ea6\u51fa\u53d1\uff0c\u6392\u9664\u5927\u90e8\u5206\u5c0f\u68af\u5ea6\u7684\u6837\u672c\uff0c\u4ec5\u7528\u5269\u4e0b\u7684\u6837\u672c\u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\uff0c\u5b83\u662f\u4e00\u79cd\u5728\u51cf\u5c11\u6570\u636e\u91cf\u548c\u4fdd\u8bc1\u7cbe\u5ea6\u4e0a\u5e73\u8861\u7684\u7b97\u6cd5\u3002<\/p>\n\n\n\n<p>AdaBoost\u4e2d\uff0c\u6837\u672c\u6743\u91cd\u662f\u6570\u636e\u91cd\u8981\u6027\u7684\u6307\u6807\u3002\u7136\u800c\u5728GBDT\u4e2d\u6ca1\u6709\u539f\u59cb\u6837\u672c\u6743\u91cd\uff0c\u4e0d\u80fd\u5e94\u7528\u6743\u91cd\u91c7\u6837\u3002\u5e78\u8fd0\u7684\u662f\uff0cGBDT\u4e2d\u6bcf\u4e2a\u6570\u636e\u90fd\u6709\u4e0d\u540c\u7684\u68af\u5ea6\u503c\uff0c\u5bf9\u91c7\u6837\u5341\u5206\u6709\u7528\u3002\u5373\u68af\u5ea6\u5c0f\u7684\u6837\u672c\uff0c\u8bad\u7ec3\u8bef\u5dee\u4e5f\u6bd4\u8f83\u5c0f\uff0c\u8bf4\u660e\u6570\u636e\u5df2\u7ecf\u88ab\u6a21\u578b\u5b66\u4e60\u5f97\u5f88\u597d\u4e86\uff0c\u76f4\u63a5\u60f3\u6cd5\u5c31\u662f\u4e22\u6389\u8fd9\u90e8\u5206\u68af\u5ea6\u5c0f\u7684\u6570\u636e\u3002\u7136\u800c\u8fd9\u6837\u505a\u4f1a\u6539\u53d8\u6570\u636e\u7684\u5206\u5e03\uff0c\u5c06\u4f1a\u5f71\u54cd\u8bad\u7ec3\u6a21\u578b\u7684\u7cbe\u786e\u5ea6\uff0c\u4e3a\u4e86\u907f\u514d\u6b64\u95ee\u9898\uff0c\u63d0\u51fa\u4e86GOSS\u7b97\u6cd5\u3002<\/p>\n\n\n\n<p>GOSS\u662f\u4e00\u4e2a\u6837\u672c\u7684\u91c7\u6837\u7b97\u6cd5\uff0c\u76ee\u7684\u662f\u4e1f\u5f03\u4e00\u4e9b\u5bf9\u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\u6ca1\u6709\u5e2e\u52a9\u7684\u6837\u672c\u3002\u6839\u636e\u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\u7684\u5b9a\u4e49\uff0c\u68af\u5ea6\u5927\u7684\u6837\u672c\u5bf9\u4fe1\u606f\u589e\u76ca\u6709\u66f4\u5927\u7684\u5f71\u54cd\u3002\u56e0\u6b64\uff0cGOSS\u5728\u8fdb\u884c\u6570\u636e\u91c7\u6837\u65f6\u53ea\u4fdd\u7559\u68af\u5ea6\u8f83\u5927\u7684\u6570\u636e\uff0c\u4f46\u662f\u5982\u679c\u76f4\u63a5\u5c06\u6240\u6709\u68af\u5ea6\u8f83\u5c0f\u7684\u6570\u636e\u90fd\u4e1f\u5f03\u6389\u52bf\u5fc5\u4f1a\u5f71\u54cd\u6570\u636e\u7684\u603b\u4f53\u5206\u5e03\u3002\u6240\u4ee5\uff0cGOSS\u9996\u5148\u5c06\u8fdb\u884c\u5206\u88c2\u7684\u7279\u5f81\u7684\u6240\u6709\u53d6\u503c\u6309\u7167\u7edd\u5bf9\u503c\u5927\u5c0f\u964d\u5e8f\u6392\u5e8f\uff08XGBoost\u4e00\u6837\u4e5f\u8fdb\u884c\u4e86\u6392\u5e8f\uff0c\u4f46\u662fLightGBM\u4e0d\u7528\u4fdd\u5b58\u6392\u5e8f\u540e\u7684\u7ed3\u679c\uff09\uff0c\u9009\u53d6\u7edd\u5bf9\u503c\u6700\u5927\u7684 a\u2217100%\u4e2a\u6570 \u636e\u3002\u7136\u540e\u5728\u5269\u4e0b\u7684\u8f83\u5c0f\u68af\u5ea6\u6570\u636e\u4e2d\u968f\u673a\u9009\u62e9 b\u2217100%\u4e2a\u6570\u636e\u3002\u63a5\u7740\u5c06\u8fd9b\u2217100%\u4e2a\u6570\u636e\u4e58\u4ee5\u4e00\u4e2a\u5e38\u6570$\\frac{1-a}{b}$\uff0c\u8fd9\u6837\u7b97\u6cd5\u5c31\u4f1a\u66f4\u5173\u6ce8\u8bad\u7ec3\u4e0d\u8db3\u7684\u6837\u672c,\u800c\u4e0d\u4f1a\u8fc7\u591a\u6539\u53d8\u539f\u6570\u636e\u96c6\u7684\u5206\u5e03\u3002\u6700\u540e\u4f7f\u7528\u8fd9(a+b)\u2217100% \u4e2a\u6570\u636e\u6765\u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\u3002\u4e0b\u56fe\u8bf4\u660e\u4e86GOSS\u7684\u5177\u4f53\u7b97\u6cd5\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613154957288.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">2.4 \u4e92\u65a5\u7279\u5f81\u6346\u7ed1\u7b97\u6cd5<\/h4>\n\n\n\n<p>\u9ad8\u7ef4\u5ea6\u7684\u6570\u636e\u5f80\u5f80\u662f\u7a00\u758f\u7684\uff0c\u8fd9\u79cd\u7a00\u758f\u6027\u542f\u53d1\u6211\u4eec\u8bbe\u8ba1\u4e00\u79cd\u65e0\u635f\u7684\u65b9\u6cd5\u6765\u51cf\u5c11\u7279\u5f81\u7684\u7ef4\u5ea6\u3002\u901a\u5e38\u88ab\u6346\u7ed1\u7684\u7279\u5f81\u90fd\u662f\u4e92\u65a5\u7684\uff08\u5373\u7279\u5f81\u4e0d\u4f1a\u540c\u65f6\u4e3a\u975e\u96f6\u503c\uff0c\u50cfone-hot\uff09\uff0c\u8fd9\u6837\u4e24\u4e2a\u7279\u5f81\u63cf\u7ed1\u8d77\u6765\u624d\u4e0d\u4f1a\u4e1f\u5931\u4fe1\u606f\u3002\u5982\u679c\u4e24\u4e2a\u7279\u5f81\u5e76\u4e0d\u662f\u5b8c\u5168\u4e92\u65a5 (\u90e8\u5206\u60c5\u51b5\u4e0b\u4e24\u4e2a\u7279\u5f81\u90fd\u662f\u975e\u96f6\u503c)\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u6307\u6807\u5bf9\u7279\u5f81\u4e0d\u4e92\u65a5\u7a0b\u5ea6\u8fdb\u884c\u8861\u91cf\uff0c\u79f0\u4e4b\u4e3a\u51b2\u7a81\u6bd4\u7387\uff0c\u5f53\u8fd9\u4e2a\u503c\u8f83\u5c0f\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u9009\u62e9\u628a\u4e0d\u5b8c\u5168\u4e92\u65a5\u7684\u4e24\u4e2a\u7279\u5f81\u6346\u7ed1\uff0c\u800c\u4e0d\u5f71\u54cd\u6700\u540e\u7684\u7cbe\u5ea6\u3002<\/p>\n\n\n\n<p>\u4e92\u65a5\u7279\u5f81\u6346\u7ed1\u7b97\u6cd5 (Exclusive Feature Bundling, EFB) \u6307\u51fa\u5982\u679c\u5c06\u4e00\u4e9b\u7279\u5f81\u8fdb\u884c\u878d\u5408\u7ed1\u5b9a\uff0c\u5219\u53ef\u4ee5\u964d\u4f4e\u7279\u5f81\u6570\u91cf\u3002\u8fd9\u6837\u5728\u6784\u5efa\u76f4\u65b9\u56fe\u65f6\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4eceO(#data* #feature)\u53d8\u4e3aO(#data*#bundle)\uff0c\u8fd9\u91cc#bundle\u6307\u7279\u5f81\u878d\u5408\u7ed1\u5b9a\u540e\u7279\u5f81\u5305\u7684\u4e2a\u6570, \u4e14#bundle&lt;&lt;#feature \u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. LightGBM\u7684\u5de5\u7a0b\u4f18\u5316<\/h3>\n\n\n\n<p>\u5728\u8bba\u6587\u300aLightgbm: A highly efficient gradient boosting decision tree\u300b\u4e2d\u6ca1\u6709\u63d0\u5230\u5de5\u7a0b\u4f18\u5316\u65b9\u6848\uff0c\u800c\u5728\u5176\u76f8\u5173\u8bba\u6587\u300aA communication-efficient parallel algorithm for decision tree\u300b\u4e2d\u63d0\u5230\u4f18\u5316\u65b9\u6848\uff0c\u672c\u8282\u4f5c\u4e3aLightGBM\u7684\u5de5\u7a0b\u4f18\u5316\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 \u76f4\u63a5\u652f\u6301\u7c7b\u522b\u7279\u5f81<\/h4>\n\n\n\n<p>\u5b9e\u9645\u4e0a\u5927\u591a\u6570\u673a\u5668\u5b66\u4e60\u5de5\u5177\u90fd\u65e0\u6cd5\u76f4\u63a5\u652f\u6301\u7c7b\u522b\u7279\u5f81\uff0c\u4e00\u822c\u9700\u8981\u628a\u7c7b\u522b\u7279\u5f81\uff0c\u901a\u8fc7one-hot\u7f16\u7801\uff0c\u8f6c\u5316\u5230\u591a\u7ef4\u76840\/1\u7279\u5f81\uff0c\u964d\u4f4e\u4e86\u7a7a\u95f4\u548c\u65f6\u95f4\u7684\u6548\u7387\u3002\u4f46\u6211\u4eec\u77e5\u9053\u5bf9\u4e8e\u51b3\u7b56\u6811\u6765\u8bf4\u5e76\u4e0d\u63a8\u8350\u4f7f\u7528one-hot\u7f16\u7801\uff0c\u5c24\u5176\u5f53\u7c7b\u522b\u7279\u5f81\u4e2d\u7c7b\u522b\u4e2a\u6570\u5f88\u591a\u7684\u60c5\u51b5\u4e0b\uff0c\u4f1a\u5b58\u5728\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4f1a\u4ea7\u751f\u6837\u672c\u5207\u5206\u4e0d\u5e73\u8861\u95ee\u9898\uff0c\u5bfc\u81f4\u5207\u5206\u589e\u76ca\u975e\u5e38\u5c0f\uff08\u5373\u6d6a\u8d39\u4e86\u8fd9\u4e2a\u7279\u5f81\uff09\u3002\u4f7f\u7528 one-hot\u7f16\u7801\uff0c\u610f\u5473\u7740\u5728\u6bcf\u4e00\u4e2a\u51b3\u7b56\u8282\u70b9\u4e0a\u53ea\u80fd\u4f7f\u7528one vs rest\uff08\u4f8b\u5982\u662f\u4e0d\u662f\u72d7\uff0c\u662f\u4e0d\u662f\u732b\u7b49\uff09\u7684\u5207\u5206\u65b9\u5f0f\u3002\u4f8b\u5982\uff0c\u52a8\u7269\u7c7b\u522b\u5207\u5206\u540e\uff0c\u4f1a\u4ea7\u751f\u662f\u5426\u72d7\uff0c\u662f\u5426\u732b\u7b49\u4e00\u7cfb\u5217\u7279\u5f81\uff0c\u8fd9\u4e00\u7cfb\u5217\u7279\u5f81\u4e0a\u53ea\u6709\u5c11\u91cf\u6837\u672c\u4e3a 1\uff0c\u5927\u91cf\u6837\u672c\u4e3a 0\uff0c\u8fd9\u65f6\u5019\u5207\u5206\u6837\u672c\u4f1a\u4ea7\u751f\u4e0d\u5e73\u8861\uff0c\u8fd9\u610f\u5473\u7740\u5207\u5206\u589e\u76ca\u4e5f\u4f1a\u5f88\u5c0f\u3002\u8f83\u5c0f\u7684\u90a3\u4e2a\u5207\u5206\u6837\u672c\u96c6\uff0c\u5b83\u5360\u603b\u6837\u672c\u7684\u6bd4\u4f8b\u592a\u5c0f\uff0c\u65e0\u8bba\u589e\u76ca\u591a\u5927\uff0c\u4e58\u4ee5\u8be5\u6bd4\u4f8b\u4e4b\u540e\u51e0\u4e4e\u53ef\u4ee5\u5ffd\u7565\uff1b\u8f83\u5927\u7684\u90a3\u4e2a\u62c6\u5206\u6837\u672c\u96c6\uff0c\u5b83\u51e0\u4e4e\u5c31\u662f\u539f\u59cb\u7684\u6837\u672c\u96c6\uff0c\u589e\u76ca\u51e0\u4e4e\u4e3a\u96f6\u3002\u6bd4\u8f83\u76f4\u89c2\u7684\u7406\u89e3\u5c31\u662f\u4e0d\u5e73\u8861\u7684\u5207\u5206\u548c\u4e0d\u5207\u5206\u6ca1\u6709\u533a\u522b\u3002<\/li>\n\n\n\n<li>\u4f1a\u5f71\u54cd\u51b3\u7b56\u6811\u7684\u5b66\u4e60\u3002\u56e0\u4e3a\u5c31\u7b97\u53ef\u4ee5\u5bf9\u8fd9\u4e2a\u7c7b\u522b\u7279\u5f81\u8fdb\u884c\u5207\u5206\uff0c\u72ec\u70ed\u7f16\u7801\u4e5f\u4f1a\u628a\u6570\u636e\u5207\u5206\u5230\u5f88\u591a\u96f6\u6563\u7684\u5c0f\u7a7a\u95f4\u4e0a\uff0c\u5982\u4e0b\u56fe\u5de6\u8fb9\u6240\u793a\u3002\u800c\u51b3\u7b56\u6811\u5b66\u4e60\u65f6\u5229\u7528\u7684\u662f\u7edf\u8ba1\u4fe1\u606f\uff0c\u5728\u8fd9\u4e9b\u6570\u636e\u91cf\u5c0f\u7684\u7a7a\u95f4\u4e0a\uff0c\u7edf\u8ba1\u4fe1\u606f\u4e0d\u51c6\u786e\uff0c\u5b66\u4e60\u6548\u679c\u4f1a\u53d8\u5dee\u3002\u4f46\u5982\u679c\u4f7f\u7528\u4e0b\u56fe\u53f3\u8fb9\u7684\u5207\u5206\u65b9\u6cd5\uff0c\u6570\u636e\u4f1a\u88ab\u5207\u5206\u5230\u4e24\u4e2a\u6bd4\u8f83\u5927\u7684\u7a7a\u95f4\uff0c\u8fdb\u4e00\u6b65\u7684\u5b66\u4e60\u4e5f\u4f1a\u66f4\u597d\u3002\u4e0b\u56fe\u53f3\u8fb9\u53f6\u5b50\u8282\u70b9\u7684\u542b\u4e49\u662fX=A\u6216\u8005X=C\u653e\u5230\u5de6\u5b69\u5b50\uff0c\u5176\u4f59\u653e\u5230\u53f3\u5b69\u5b50\u3002<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613160017976.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p>\u4e8b\u5b9e\u4e0a\uff0c\u7c7b\u522b\u7279\u5f81\u7684\u4f7f\u7528\u5728\u5b9e\u8df5\u4e2d\u662f\u5f88\u5e38\u89c1\u7684\u3002\u4e14\u4e3a\u4e86\u89e3\u51b3one-hot\u7f16\u7801\u5904\u7406\u7c7b\u522b\u7279\u5f81\u7684\u4e0d\u8db3, LightGBM\u4f18\u5316\u4e86\u5bf9\u7c7b\u522b\u7279\u5f81\u7684\u652f\u6301\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165\u7c7b\u522b\u7279\u5f81\uff0c\u4e0d\u9700\u8981\u989d\u5916\u76840\/1\u5c55\u5f00\u3002LightGBM \u91c7\u7528many-vs-many\u7684\u5207\u5206\u65b9\u5f0f\u5c06\u7c7b\u522b\u7279\u5f81\u5206\u4e3a\u4e24\u4e2a\u5b50\u96c6\uff0c\u5b9e\u73b0\u7c7b\u522b\u7279\u5f81\u7684\u6700\u4f18\u5207\u5206\u3002\u5047\u8bbe\u67d0\u7ef4\u7279\u5f81\u6709k\u4e2a\u7c7b\u522b\uff0c\u5219\u6709$2^{k-1}-1$\u79cd\u53ef\u80fd, \u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO($2^k$)\uff0cLightGBM\u57fa\u4e8eFisher\u7684 \u300aOn Grouping For Maximum Homogeneity\u300b\u8bba\u6587\u5b9e\u73b0\u4e86O(klogk) \u7684\u65f6\u95f4\u590d\u6742\u5ea6\u3002<\/p>\n\n\n\n<p>\u7b97\u6cd5\u6d41\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u5728\u679a\u4e3e\u5206\u5272\u70b9\u4e4b\u524d\uff0c\u5148\u628a\u76f4\u65b9\u56fe\u6309\u7167\u6bcf\u4e2a\u7c7b\u522b\u5bf9\u5e94\u7684label\u5747\u503c\u8fdb\u884c\u6392\u5e8f; \u7136\u540e\u6309\u7167\u6392\u5e8f\u7684\u7ed3\u679c\u4f9d\u6b21\u679a\u4e3e\u6700\u4f18\u5206\u5272\u70b9\u3002\u4ece\u4e0b\u56fe\u53ef\u4ee5\u770b\u5230,$frac{Sum(y)}{Count(y)}$\u4e3a\u7c7b\u522b\u7684\u5747\u503c\u3002\u5f53\u7136\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u5f88\u5bb9\u6613\u8fc7\u62df\u5408\uff0c\u6240\u4ee5LightGBM\u91cc\u9762\u8fd8\u589e\u52a0\u4e86\u5f88\u591a\u5bf9\u4e8e\u8fd9\u4e2a\u65b9\u6cd5\u7684\u7ea6\u675f\u548c\u6b63\u5219\u5316\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613160337313.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p>\u5728Expo\u6570\u636e\u96c6\u4e0a\u7684\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u76f8\u6bd40\/1\u5c55\u5f00\u7684\u65b9\u6cd5\uff0c\u4f7f\u7528LightGBM\u652f\u6301\u7684\u7c7b\u522b\u7279\u5f81\u53ef\u4ee5\u4f7f\u8bad\u7ec3\u901f\u5ea6\u52a0\u901f8\u500d\uff0c\u5e76\u4e14\u7cbe\u5ea6\u4e00\u81f4\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0cLightGBM\u662f\u7b2c\u4e00\u4e2a\u76f4\u63a5\u652f\u6301\u7c7b\u522b\u7279\u5f81\u7684GBDT\u5de5\u5177\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 \u652f\u6301\u9ad8\u6548\u5e76\u884c<\/h4>\n\n\n\n<p><strong>\uff081\uff09\u7279\u5f81\u5e76\u884c<\/strong><\/p>\n\n\n\n<p>\u7279\u5f81\u5e76\u884c\u7684\u4e3b\u8981\u601d\u60f3\u662f\u4e0d\u540c\u673a\u5668\u5728\u4e0d\u540c\u7684\u7279\u5f81\u96c6\u5408\u4e0a\u5206\u522b\u5bfb\u627e\u6700\u4f18\u7684\u5206\u5272\u70b9\uff0c\u7136\u540e\u5728\u673a\u5668\u95f4\u540c\u6b65\u6700\u4f18\u7684\u5206\u5272\u70b9\u3002XGBoost\u4f7f\u7528\u7684\u5c31\u662f\u8fd9\u79cd\u7279\u5f81\u5e76\u884c\u65b9\u6cd5\u3002\u8fd9\u79cd\u7279\u5f81\u5e76\u884c\u65b9\u6cd5\u6709\u4e2a\u5f88\u5927\u7684\u7f3a\u70b9\uff1a\u5c31\u662f\u5bf9\u6570\u636e\u8fdb\u884c\u5782\u76f4\u5212\u5206\uff0c\u6bcf\u53f0\u673a\u5668\u6240\u542b\u6570\u636e\u4e0d\u540c\uff0c\u7136\u540e\u4f7f\u7528\u4e0d\u540c\u673a\u5668\u627e\u5230\u4e0d\u540c\u7279\u5f81\u7684\u6700\u4f18\u5206\u88c2\u70b9\uff0c\u5212\u5206\u7ed3\u679c\u9700\u8981\u901a\u8fc7\u901a\u4fe1\u544a\u77e5\u6bcf\u53f0\u673a\u5668\uff0c\u589e\u52a0\u4e86\u989d\u5916\u7684\u590d\u6742\u5ea6\u3002<\/p>\n\n\n\n<p>LightGBM \u5219\u4e0d\u8fdb\u884c\u6570\u636e\u5782\u76f4\u5212\u5206\uff0c\u800c\u662f\u5728\u6bcf\u53f0\u673a\u5668\u4e0a\u4fdd\u5b58\u5168\u90e8\u8bad\u7ec3\u6570\u636e\uff0c\u5728\u5f97\u5230\u6700\u4f73\u5212\u5206\u65b9\u6848\u540e\u53ef\u5728\u672c\u5730\u6267\u884c\u5212\u5206\u800c\u51cf\u5c11\u4e86\u4e0d\u5fc5\u8981\u7684\u901a\u4fe1\u3002\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613160711375.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p><strong>\uff082\uff09\u6570\u636e\u5e76\u884c<\/strong><\/p>\n\n\n\n<p>\u4f20\u7edf\u7684\u6570\u636e\u5e76\u884c\u7b56\u7565\u4e3b\u8981\u4e3a\u6c34\u5e73\u5212\u5206\u6570\u636e\uff0c\u8ba9\u4e0d\u540c\u7684\u673a\u5668\u5148\u5728\u672c\u5730\u6784\u9020\u76f4\u65b9\u56fe\uff0c\u7136\u540e\u8fdb\u884c\u5168\u5c40\u7684\u5408\u5e76\uff0c\u6700\u540e\u5728\u5408\u5e76\u7684\u76f4\u65b9\u56fe\u4e0a\u9762\u5bfb\u627e\u6700\u4f18\u5206\u5272\u70b9\u3002\u8fd9\u79cd\u6570\u636e\u5212\u5206\u6709\u4e00\u4e2a\u5f88\u5927\u7684\u7f3a\u70b9\uff1a\u901a\u8baf\u5f00\u9500\u8fc7\u5927\u3002\u5982\u679c\u4f7f\u7528\u70b9\u5bf9\u70b9\u901a\u4fe1\uff0c\u4e00\u53f0\u673a\u5668\u7684\u901a\u8baf\u5f00\u9500\u5927\u7ea6\u4e3a O(#machine*#feature*#bin) \u5982\u679c\u4f7f\u7528\u96c6\u6210\u7684\u901a\u4fe1\uff0c\u5219\u901a\u8baf\u5f00\u9500\u4e3aO(2*#feature*#bin)<\/p>\n\n\n\n<p>LightGBM\u5728\u6570\u636e\u5e76\u884c\u4e2d\u4f7f\u7528\u5206\u6563\u89c4\u7ea6(Reduce scatter)\u628a\u76f4\u65b9\u56fe\u5408\u5e76\u7684\u4efb\u52a1\u5206\u644a\u5230\u4e0d\u540c\u7684\u673a\u5668\uff0c\u964d\u4f4e\u901a\u4fe1\u548c\u8ba1\u7b97\uff0c\u5e76\u5229\u7528\u76f4\u65b9\u56fe\u505a\u5dee\uff0c\u8fdb\u4e00\u6b65\u51cf\u5c11\u4e86\u4e00\u534a\u7684\u901a\u4fe1\u91cf\u3002\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613160958791.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p><strong>(3) \u6295\u7968\u5e76\u884c<\/strong><\/p>\n\n\n\n<p>\u57fa\u4e8e\u6295\u7968\u7684\u6570\u636e\u5e76\u884c\u5219\u8fdb\u4e00\u6b65\u4f18\u5316\u6570\u636e\u5e76\u884c\u4e2d\u7684\u901a\u4fe1\u4ee3\u4ef7\uff0c\u4f7f\u901a\u4fe1\u4ee3\u4ef7\u53d8\u6210\u5e38\u6570\u7ea7\u522b\u3002\u5728\u6570\u636e\u91cf\u5f88\u5927\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u6295\u7968\u5e76\u884c\u7684\u65b9\u5f0f\u53ea\u5408\u5e76\u90e8\u5206\u7279\u5f81\u7684\u76f4\u65b9\u56fe\u4ece\u800c\u8fbe\u5230\u964d\u4f4e\u901a\u4fe1\u91cf\u7684\u76ee\u7684\uff0c\u53ef\u4ee5\u5f97\u5230\u975e\u5e38\u597d\u7684\u52a0\u901f\u6548\u679c\u3002\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<p>\u5927\u81f4\u6b65\u9aa4\u4e3a\u4e24\u6b65\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u672c\u5730\u627e\u51fa Top K \u7279\u5f81\uff0c\u5e76\u57fa\u4e8e\u6295\u7968\u7b5b\u9009\u51fa\u53ef\u80fd\u662f\u6700\u4f18\u5206\u5272\u70b9\u7684\u7279\u5f81\uff1b<\/li>\n\n\n\n<li>\u5408\u5e76\u65f6\u53ea\u5408\u5e76\u6bcf\u4e2a\u673a\u5668\u9009\u51fa\u6765\u7684\u7279\u5f81\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613161100307.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">3.3 Cache\u547d\u4e2d\u7387\u4f18\u5316<\/h4>\n\n\n\n<p>XGBoost\u5bf9cache\u4f18\u5316\u4e0d\u53cb\u597d\uff0c\u5982\u4e0b\u56fe\u6240\u793a\u3002\u5728\u9884\u6392\u5e8f\u540e\uff0c\u7279\u5f81\u5bf9\u68af\u5ea6\u7684\u8bbf\u95ee\u662f\u4e00\u79cd\u968f\u673a\u8bbf\u95ee\uff0c\u5e76\u4e14\u4e0d\u540c\u7684\u7279\u5f81\u8bbf\u95ee\u7684\u987a\u5e8f\u4e0d\u4e00\u6837\uff0c\u65e0\u6cd5\u5bf9cache\u8fdb\u884c\u4f18\u5316\u3002\u540c\u65f6\uff0c\u5728\u6bcf\u4e00\u5c42\u957f\u6811\u7684\u65f6\u5019\uff0c\u9700\u8981\u968f\u673a\u8bbf\u95ee\u4e00\u4e2a\u884c\u7d22\u5f15\u5230\u53f6\u5b50\u7d22\u5f15\u7684\u6570\u7ec4\uff0c\u5e76\u4e14\u4e0d\u540c\u7279\u5f81\u8bbf\u95ee\u7684\u987a\u5e8f\u4e5f\u4e0d\u4e00\u6837\uff0c\u4e5f\u4f1a\u9020\u6210\u8f83\u5927\u7684cache miss\u3002\u4e3a\u4e86\u89e3\u51b3\u7f13\u5b58\u547d\u4e2d\u7387\u4f4e\u7684\u95ee\u9898\uff0cXGBoost \u63d0\u51fa\u4e86\u7f13\u5b58\u8bbf\u95ee\u7b97\u6cd5\u8fdb\u884c\u6539\u8fdb\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/2020061316112189.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p>\u800c LightGBM \u6240\u4f7f\u7528\u76f4\u65b9\u56fe\u7b97\u6cd5\u5bf9 Cache \u5929\u751f\u53cb\u597d\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\uff0c\u6240\u6709\u7684\u7279\u5f81\u90fd\u91c7\u7528\u76f8\u540c\u7684\u65b9\u5f0f\u83b7\u5f97\u68af\u5ea6\uff08\u533a\u522b\u4e8eXGBoost\u7684\u4e0d\u540c\u7279\u5f81\u901a\u8fc7\u4e0d\u540c\u7684\u7d22\u5f15\u83b7\u5f97\u68af\u5ea6\uff09\uff0c\u53ea\u9700\u8981\u5bf9\u68af\u5ea6\u8fdb\u884c\u6392\u5e8f\u5e76\u53ef\u5b9e\u73b0\u8fde\u7eed\u8bbf\u95ee\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u7f13\u5b58\u547d\u4e2d\u7387\uff1b<\/li>\n\n\n\n<li>\u5176\u6b21\uff0c\u56e0\u4e3a\u4e0d\u9700\u8981\u5b58\u50a8\u884c\u7d22\u5f15\u5230\u53f6\u5b50\u7d22\u5f15\u7684\u6570\u7ec4\uff0c\u964d\u4f4e\u4e86\u5b58\u50a8\u6d88\u8017\uff0c\u800c\u4e14\u4e5f\u4e0d\u5b58\u5728Cache Miss\u7684\u95ee\u9898\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2023\/07\/20200613161203374.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">4. LightGBM\u7684\u4f18\u7f3a\u70b9<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">4.1 \u4f18\u70b9<\/h4>\n\n\n\n<p>\u8fd9\u90e8\u5206\u4e3b\u8981\u603b\u7ed3\u4e0bLightGBM\u76f8\u5bf9\u4e8eXGBoost\u7684\u4f18\u70b9\uff0c\u4ece\u5185\u5b58\u548c\u901f\u5ea6\u4e24\u65b9\u9762\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n\n\n\n<p><strong>\uff081\uff09\u901f\u5ea6\u66f4\u5feb<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LightGBM \u91c7\u7528\u4e86\u76f4\u65b9\u56fe\u7b97\u6cd5\u5c06\u904d\u5386\u6837\u672c\u8f6c\u53d8\u4e3a\u904d\u5386\u76f4\u65b9\u56fe\uff0c\u6781\u5927\u7684\u964d\u4f4e\u4e86\u65f6\u95f4\u590d\u6742\u5ea6\uff1b<\/li>\n\n\n\n<li>LightGBM \u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u91c7\u7528\u5355\u8fb9\u68af\u5ea6\u7b97\u6cd5\u8fc7\u6ee4\u6389\u68af\u5ea6\u5c0f\u7684\u6837\u672c\uff0c\u51cf\u5c11\u4e86\u5927\u91cf\u7684\u8ba1\u7b97\uff1b<\/li>\n\n\n\n<li>LightGBM \u91c7\u7528\u4e86\u57fa\u4e8e Leaf-wise \u7b97\u6cd5\u7684\u589e\u957f\u7b56\u7565\u6784\u5efa\u6811\uff0c\u51cf\u5c11\u4e86\u5f88\u591a\u4e0d\u5fc5\u8981\u7684\u8ba1\u7b97\u91cf\uff1b<\/li>\n\n\n\n<li>LightGBM \u91c7\u7528\u4f18\u5316\u540e\u7684\u7279\u5f81\u5e76\u884c\u3001\u6570\u636e\u5e76\u884c\u65b9\u6cd5\u52a0\u901f\u8ba1\u7b97\uff0c\u5f53\u6570\u636e\u91cf\u975e\u5e38\u5927\u7684\u65f6\u5019\u8fd8\u53ef\u4ee5\u91c7\u7528\u6295\u7968\u5e76\u884c\u7684\u7b56\u7565\uff1b<\/li>\n\n\n\n<li>LightGBM \u5bf9\u7f13\u5b58\u4e5f\u8fdb\u884c\u4e86\u4f18\u5316\uff0c\u589e\u52a0\u4e86\u7f13\u5b58\u547d\u4e2d\u7387\uff1b<br><strong>\uff082\uff09\u5185\u5b58\u66f4\u5c0f<\/strong><\/li>\n\n\n\n<li>XGBoost\u4f7f\u7528\u9884\u6392\u5e8f\u540e\u9700\u8981\u8bb0\u5f55\u7279\u5f81\u503c\u53ca\u5176\u5bf9\u5e94\u6837\u672c\u7684\u7edf\u8ba1\u503c\u7684\u7d22\u5f15\uff0c\u800c LightGBM \u4f7f\u7528\u4e86\u76f4\u65b9\u56fe\u7b97\u6cd5\u5c06\u7279\u5f81\u503c\u8f6c\u53d8\u4e3a bin\u503c\uff0c\u4e14\u4e0d\u9700\u8981\u8bb0\u5f55\u7279\u5f81\u5230\u6837\u672c\u7684\u7d22\u5f15\uff0c\u5c06\u7a7a\u95f4\u590d\u6742\u5ea6\u4eceO(2*#data)\u964d\u4f4e\u4e3aO(#bin)\uff0c\u6781\u5927\u7684\u51cf\u5c11\u4e86\u5185\u5b58\u6d88\u8017\uff1b<\/li>\n\n\n\n<li>LightGBM \u91c7\u7528\u4e86\u76f4\u65b9\u56fe\u7b97\u6cd5\u5c06\u5b58\u50a8\u7279\u5f81\u503c\u8f6c\u53d8\u4e3a\u5b58\u50a8 bin \u503c\uff0c\u964d\u4f4e\u4e86\u5185\u5b58\u6d88\u8017\uff1b<\/li>\n\n\n\n<li>LightGBM \u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u91c7\u7528\u4e92\u65a5\u7279\u5f81\u6346\u7ed1\u7b97\u6cd5\u51cf\u5c11\u4e86\u7279\u5f81\u6570\u91cf\uff0c\u964d\u4f4e\u4e86\u5185\u5b58\u6d88\u8017\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">4.2 \u7f3a\u70b9<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53ef\u80fd\u4f1a\u957f\u51fa\u6bd4\u8f83\u6df1\u7684\u51b3\u7b56\u6811\uff0c\u4ea7\u751f\u8fc7\u62df\u5408\u3002\u56e0\u6b64LightGBM\u5728Leaf-wise\u4e4b\u4e0a\u589e\u52a0\u4e86\u4e00\u4e2a\u6700\u5927\u6df1\u5ea6\u9650\u5236\uff0c\u5728\u4fdd\u8bc1\u9ad8\u6548\u7387\u7684\u540c\u65f6\u9632\u6b62\u8fc7\u62df\u5408\uff1b<\/li>\n\n\n\n<li>Boosting\u65cf\u662f\u8fed\u4ee3\u7b97\u6cd5\uff0c\u6bcf\u4e00\u6b21\u8fed\u4ee3\u90fd\u6839\u636e\u4e0a\u4e00\u6b21\u8fed\u4ee3\u7684\u9884\u6d4b\u7ed3\u679c\u5bf9\u6837\u672c\u8fdb\u884c\u6743\u91cd\u8c03\u6574\uff0c\u6240\u4ee5\u968f\u7740\u8fed\u4ee3\u4e0d\u65ad\u8fdb\u884c\uff0c\u8bef\u5dee\u4f1a\u8d8a\u6765\u8d8a\u5c0f\uff0c\u6a21\u578b\u7684\u504f\u5dee\uff08bias\uff09\u4f1a\u4e0d\u65ad\u964d\u4f4e\u3002\u7531\u4e8eLightGBM\u662f\u57fa\u4e8e\u504f\u5dee\u7684\u7b97\u6cd5\uff0c\u6240\u4ee5\u4f1a\u5bf9\u566a\u70b9\u8f83\u4e3a\u654f\u611f\uff1b<\/li>\n\n\n\n<li>\u5728\u5bfb\u627e\u6700\u4f18\u89e3\u65f6\uff0c\u4f9d\u636e\u7684\u662f\u6700\u4f18\u5207\u5206\u53d8\u91cf\uff0c\u6ca1\u6709\u5c06\u6700\u4f18\u89e3\u662f\u5168\u90e8\u7279\u5f81\u7684\u7efc\u5408\u8fd9\u4e00\u7406\u5ff5\u8003\u8651\u8fdb\u53bb\uff1b<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. LightGBM\u7b80\u4ecb GBDT (Gradient Boosting Decision Tree) \u662f\u673a\u5668\u5b66\u4e60\u4e2d\u4e00\u4e2a\u957f\u76db\u4e0d\u8870 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":28,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2],"tags":[3,4],"class_list":["post-15","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algorithm_learning","tag-lightgbm","tag-4"],"_links":{"self":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":8,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/15\/revisions\/290"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/media\/28"}],"wp:attachment":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}