LightGBM: LightGBM 2.1.2 Bug? - If you don't set 'boost_from_average=false' then the shrinkage is set to 1 for the first tree instead of the set parameter value
Below is a model output without setting the ‘boost_from_average=false’ parameter in version 2.1.2. You can see that ‘shrinkage’ is set to 1 for the first tree (Tree=0) for some reason and then it changes to the set parameter value.
I’m not sure if this the default behavior now (didn’t see any updated documentation) but it returns completely different results than the last version. I can see this causing a ton of problems for people updating LGB to 2.1.2. My model training results were drastically worse than the one created with the other version.
Tree=0
num_leaves=35
num_cat=2
split_feature=0 0 2 10 5 18 10 0 0 8 3 10 10 15 8 10 0 0 9 0 7 15 13 18 13 12 9 5 15 6 2 5 13 2
split_gain=1157.9 1200.12 589.218 266.5 214.587 170.697 135.443 132.99 96.2071 93.2053 80.8721 76.3493 69.4331 75.0835 67.8062 67.2649 109.225 59.3376 77.9133 54.1652 53.4583 55.6504 51.9849 51.9826 51.5137 51.0333 50.5939 49.1426 44.9309 45.1413 43.4918 43.1427 42.7473 40.7209
threshold=65.500000000000014 34.500000000000007 71.975000000000009 97.500000000000014 0.59500000000000008 211.50000000000003 226.50000000000003 78.500000000000014 84.500000000000014 7.5000000000000009 0 37.500000000000007 154.50000000000003 2.5000000000000004 12.500000000000002 80.500000000000014 62.500000000000007 69.500000000000014 5.5000000000000009 28.500000000000004 1 1.0000000180025095e-35 121.50000000000001 332.50000000000006 58.500000000000007 79.750000000000014 5.5000000000000009 1.4750000000000003 1.5000000000000002 42.500000000000007 54.07500000000001 0.015000000000000001 316.50000000000006 33.275000000000006
decision_type=8 10 2 8 8 10 8 10 10 2 1 8 8 10 2 8 10 8 2 10 1 10 2 10 2 2 2 8 8 10 2 8 2 2
left_child=1 6 4 7 9 27 19 20 14 26 12 -7 32 -14 17 24 -17 30 -19 -1 21 -2 -9 -15 -11 -12 -3 -6 33 -30 -5 -27 -4 -22
right_child=3 2 10 8 5 11 -8 22 -10 15 25 -13 13 23 -16 16 -18 18 -20 -21 28 -23 -24 -25 -26 31 -28 -29 29 -31 -32 -33 -34 -35
leaf_value=-1.3017993273605202 -1.2365519237007825 -1.1704605392075984 -1.1875759669484003 -1.1833302065593161 -1.2018216103277415 -1.1515881785938882 -1.3528821519057714 -1.356715522267989 -1.3843001904610113 -1.179889945384103 -1.2460417229323717 -1.2127216638057154 -1.2915602336119141 -1.2794855052648977 -1.3204334787470304 -1.1878180669769636 -1.2826554601297457 -1.3427217190527609 -1.2340237132810807 -1.256917319068303 -1.2606362037072381 -1.1663853564890327 -1.2018216103277415 -1.2091975110260338 -1.1275935361267115 -1.3576317831911671 -1.1444901123873226 -1.3155240700056141 -1.1988277640088607 -1.330077984621862 -1.2868820666124829 -1.273957548880817 -1.3168291197401223 -1.3904339241090904
leaf_count=547 209 1058 306 69 36 146 398 163 242 323 387 723 259 144 948 1303 140 221 96 606 61 134 20 372 141 126 711 226 93 42 74 197 33 60
internal_value=0 2.42746 2.68817 0.844371 2.95421 2.25245 0.693821 1.71992 0.300202 3.12342 1.72862 2.56473 2.02163 1.67897 0.493512 2.85941 2.66362 1.11488 0.544005 1.01683 2.07541 2.49045 -0.0250355 2.04779 3.35231 1.17775 3.36588 0.695489 1.35225 2.01773 2.04843 0.518342 2.64117 0.312707
internal_count=10614 8182 6631 2432 4807 1131 1551 782 1650 3676 1824 869 1114 775 1408 1907 1443 460 317 1153 599 343 183 516 464 710 1769 262 256 135 143 323 339 121
cat_boundaries=0 1 2
cat_threshold=2 1
shrinkage=1
Tree=1
num_leaves=35
num_cat=3
split_feature=0 0 10 4 5 2 0 0 0 0 4 2 11 0 5 14 7 4 6 18 11 15 7 17 0 17 15 9 2 13 11 6 4 4
split_gain=944.038 875.382 452.34 233.985 130.248 144.572 134.765 100.2 93.9869 81.3694 78.141 72.6584 58.5265 55.4876 55.7227 50.5636 50.4966 50.4294 50.2957 49.6577 45.8201 45.1958 45.0761 44.4216 47.5296 49.2615 50.8011 43.982 43.0995 42.1877 41.8501 41.0538 38.909 38.4231
threshold=69.500000000000014 32.500000000000007 154.50000000000003 58.500000000000007 7.3000000000000016 84.575000000000003 59.500000000000007 39.500000000000007 59.500000000000007 74.500000000000014 47.500000000000007 67.625000000000014 52.810000000000009 38.500000000000007 0.27500000000000008 0 1 70.500000000000014 35.500000000000007 421.50000000000006 108.325 2.5000000000000004 2 157.50000000000003 61.500000000000007 120.50000000000001 4.5000000000000009 5.5000000000000009 84.575000000000003 147.50000000000003 23.645000000000003 21.500000000000004 64.500000000000014 19.500000000000004
decision_type=10 8 8 10 8 2 8 10 10 10 10 2 8 10 10 1 1 10 10 8 10 10 1 2 10 2 10 2 2 2 8 10 8 10
left_child=1 10 7 -2 5 6 13 11 17 -5 31 33 15 14 19 -12 -10 27 -17 -4 32 -18 -11 24 25 -7 -27 -9 -19 -13 -31 -1 -6 -3
right_child=3 2 4 9 20 23 -8 8 16 22 12 29 -14 -15 -16 18 21 28 -20 -21 -22 -23 -24 -25 -26 26 -28 -29 -30 30 -32 -33 -34 -35
leaf_value=0.012077169455165057 -0.012629502288529668 0.00088220072728762203 0.018316423707753417 0.1217214158294474 0.10243713650000966 0.1203973861382328 0.061390377308026912 0.11954857648814066 0.12445927546884972 0.073425250407056761 0.032063979892072055 0.012472418648369059 -0.0086052959353287491 0.12009389383524052 -0.039432796901502254 0.12141774058225957 0.056751678626532298 0.15236717371212946 -0.026655596546584601 0.13184705313597286 -0.022674242795517965 0.11491648373676236 -0.019285171523004619 0.089865786193843972 0.09526334184119882 -0.035623451383552239 0.045665901194719798 0.14399439149167967 0.03301971722719 0.16231425172936223 0.0080844211574173496 -0.051890631137136746 0.022188730680620272 0.11483059170855676
leaf_count=289 1183 35 66 144 74 29 620 1126 498 113 351 144 227 1127 56 117 262 1008 35 69 157 177 122 141 72 237 139 708 32 25 32 251 188 760
internal_value=0 2.0935 2.26102 0.320569 1.66904 1.80237 2.01148 2.53403 2.63968 1.54707 0.394027 2.03888 0.804718 2.28163 1.30681 1.15121 2.1629 2.76455 1.96681 1.8184 0.563155 1.69056 0.682039 0.925351 0.589693 0.260019 -0.00170212 2.60076 3.01066 0.944138 2.12613 -0.295615 1.03737 2.23593
internal_count=10614 9052 7782 1562 2975 2556 1938 4807 3811 379 1270 996 730 1318 191 503 937 2874 152 135 419 439 235 618 477 405 376 1834 1040 201 57 540 262 795
cat_boundaries=0 1 2 3
cat_threshold=5 1 1
shrinkage=0.05
Below is the output with ‘boost_from_average=false’ added to the parameters which is resulting in the same result as the last version -
Tree=0
num_leaves=35
num_cat=2
split_feature=0 0 2 10 5 18 10 0 0 8 3 10 10 15 8 10 0 0 9 0 7 15 13 18 13 12 9 5 15 6 2 5 5 13
split_gain=767.383 795.361 390.496 176.619 142.214 113.127 89.7627 88.1372 63.7598 61.7704 53.5968 50.5994 46.0157 49.7605 44.9375 44.5788 72.3874 39.3251 51.6359 35.8972 35.4287 36.8815 34.4522 34.4507 34.1399 33.8216 33.5303 32.5685 29.7773 29.9167 28.8235 31.4228 28.5922 28.3301
threshold=65.500000000000014 34.500000000000007 71.975000000000009 97.500000000000014 0.59500000000000008 211.50000000000003 226.50000000000003 78.500000000000014 84.500000000000014 7.5000000000000009 0 37.500000000000007 154.50000000000003 2.5000000000000004 12.500000000000002 80.500000000000014 62.500000000000007 69.500000000000014 5.5000000000000009 28.500000000000004 1 1.0000000180025095e-35 121.50000000000001 332.50000000000006 58.500000000000007 79.750000000000014 5.5000000000000009 1.4750000000000003 1.5000000000000002 42.500000000000007 54.07500000000001 0.12500000000000003 0.015000000000000001 316.50000000000006
decision_type=8 10 2 8 8 10 8 10 10 2 1 8 8 10 2 8 10 8 2 10 1 10 2 10 2 2 2 8 8 10 2 10 8 2
left_child=1 6 4 7 9 27 19 20 14 26 12 -7 33 -14 17 24 -17 30 -19 -1 21 -2 -9 -15 -11 -12 -3 -6 -22 -30 31 -5 -27 -4
right_child=3 2 10 8 5 11 -8 22 -10 15 25 -13 13 23 -16 16 -18 18 -20 -21 28 -23 -24 -25 -26 32 -28 -29 29 -31 -32 -33 -34 -35
leaf_value=-0.041258741258741266 0.0019830028328611899 0.045784081954294724 0.034441087613293057 0.062393162393162394 0.025000000000000001 0.058291457286432161 -0.075113122171945712 -0.077653631284916202 -0.095934959349593507 0.039534883720930232 -0.0043062200956937805 0.017776152158010244 -0.034472934472934473 -0.026470588235294121 -0.053608247422680416 0.034280639431616342 -0.028571428571428571 -0.068379446640316213 0.0036585365853658534 -0.011513859275053306 -0.047712418300653599 0.048484848484848492 0.025000000000000001 0.020111731843575422 0.074193548387096783 -0.078260869565217397 0.062995594713656386 -0.050354609929078011 0.026984126984126985 -0.059999999999999998 -0.031372549019607843 -0.044444444444444446 -0.022807017543859651 -0.051219512195121955
leaf_count=547 209 1058 306 41 36 146 398 163 242 323 387 723 259 144 948 1303 140 221 96 606 121 134 20 372 141 126 711 226 93 42 74 28 197 33
internal_value=0 0.447273 0.620056 -0.601896 0.796369 0.331288 -0.701671 -0.0216383 -0.962536 0.908512 -0.015873 0.538244 0.178318 -0.0487805 -0.834423 0.733539 0.603786 -0.422619 -0.800959 -0.487598 0.213953 0.489019 -1.17808 0.195652 1.0602 -0.380952 1.0692 -0.700565 -0.265306 0.175732 0.196078 0.745098 -0.817967 0.588905
internal_count=10614 8182 6631 2432 4807 1131 1551 782 1650 3676 1824 869 1114 775 1408 1907 1443 460 317 1153 599 343 183 516 464 710 1769 262 256 135 143 69 323 339
cat_boundaries=0 1 2
cat_threshold=2 1
shrinkage=0.05
Tree=1
num_leaves=35
num_cat=4
split_feature=0 0 10 4 4 5 2 0 9 2 0 11 6 14 4 15 0 5 2 18 14 17 10 0 17 15 6 7 6 11 4 6 3 15
split_gain=716.915 672.914 359.659 160.943 91.1547 87.8458 109.715 91.4953 68.5523 61.7381 59.4498 48.0655 48.7782 48.1281 44.1924 42.535 42.1416 39.2736 35.1531 34.6271 34.541 31.3413 35.8607 32.1955 32.458 34.2706 31.2307 31.0756 30.5169 30.1267 29.3749 29.2241 26.6931 33.9238
threshold=69.500000000000014 32.500000000000007 154.50000000000003 58.500000000000007 47.500000000000007 7.3000000000000016 84.575000000000003 59.500000000000007 5.5000000000000009 74.175000000000026 74.500000000000014 52.810000000000009 35.500000000000007 0 70.500000000000014 4.5000000000000009 38.500000000000007 0.27500000000000008 52.375000000000007 421.50000000000006 1 157.50000000000003 780.50000000000011 61.500000000000007 120.50000000000001 4.5000000000000009 28.500000000000004 2 11.500000000000002 108.325 42.500000000000007 14.500000000000002 3 3.5000000000000004
decision_type=10 10 8 10 10 8 2 10 2 2 10 10 10 1 10 10 10 10 2 8 1 2 10 10 2 10 10 1 8 10 8 10 1 10
left_child=1 4 8 -2 -1 6 7 16 14 -10 -5 12 13 15 20 18 17 19 -6 -4 32 23 -23 24 -8 -26 -9 -12 -18 -7 -28 -11 -3 -34
right_child=3 2 5 10 11 29 21 26 9 31 27 -13 -14 -15 -16 -17 28 -19 -20 -21 -22 22 -24 -25 25 -27 30 -29 -30 -31 -32 -33 33 -35
leaf_value=-0.064412345255805484 -0.063609933561782545 0.036461358801072173 -0.042232023671699731 0.029835870032551962 0.064616889682660147 -0.018133919106316201 0.025284576002381695 0.0080395877163696398 0.050411210014865176 0.045708014132661921 -0.0049365404559613812 -0.055082777652314875 -0.063728035384328058 0.024611399209709905 0.040649124568778561 -0.040750280681485937 -0.068353243986632825 -0.081979871316815306 -0.040411828600622667 0.037093724855146969 0.0089482747709704342 0.02150027030787589 -0.098835840447182313 0.010256531232840828 -0.079248789265856961 -0.023770407445608856 -0.046926597235763451 -0.067966292871672732 0.031531047171742502 -0.069143361688954061 0.0069911379538598415 -0.0068287727337938801 -0.032142286506996139 0.023805191192212988
leaf_count=607 1183 789 66 144 29 253 29 247 1518 68 113 247 123 203 999 267 27 56 39 69 667 111 28 72 233 139 246 122 1100 148 86 187 96 303
internal_value=0 0.380071 0.522954 -0.888852 -0.703331 0.0816402 0.174188 0.330172 0.73516 0.926169 -0.0424974 -0.395645 -0.190526 -0.0155666 0.596774 -0.439719 0.515458 -0.192386 0.50474 0.170873 0.460861 -0.458423 0.152735 -0.691602 -0.91714 -1.09649 -0.223462 -0.643926 0.604545 -0.679506 -0.586862 0.235616 0.594373 0.276249
internal_count=10614 9052 7537 1562 1515 2910 2509 1897 4627 1773 379 908 661 538 2854 335 1318 191 68 135 1855 612 139 473 401 372 579 235 1127 401 332 255 1188 399
cat_boundaries=0 1 2 3 4
cat_threshold=5 38 1 2
shrinkage=0.05
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (5 by maintainers)
@psinger They are independent
@psinger good catch, I fixed it
@zkurz Yes, I focus on (1), but I need to set
boost_from_average=False, so it is the other way around of what you are saying.