changeforest icon indicating copy to clipboard operation
changeforest copied to clipboard

Accessing the p-value of each segment

Open newtonharry opened this issue 4 months ago • 1 comments

Hi,

I've noticed you can get the p-value for the result, but not for each segment, which is only seen when printing the result. Have I missed something in the code?

                                          best_split max_gain p_value
(0, 2000]                                        475    36.18   0.005
 ¦--(0, 475]                                     252  103.484   0.005
 ¦   ¦--(0, 252]                                  21    4.228    0.05
 ¦   °--(252, 475]                               427   11.796   0.005
 ¦       ¦--(252, 427]                           320   46.795   0.005
 ¦       ¦   ¦--(252, 320]                       272  -17.767    0.82
 ¦       ¦   °--(320, 427]                       364  -18.147       1
 ¦       °--(427, 475]                           454   -29.02    0.99
 °--(475, 2000]                                 1228    17.11   0.005
     ¦--(475, 1228]                              785   23.767   0.005
     ¦   ¦--(475, 785]                           739    5.792   0.005
     ¦   ¦   ¦--(475, 739]                       527   45.532   0.005
     ¦   ¦   ¦   ¦--(475, 527]                   502  -17.065    0.27
     ¦   ¦   ¦   °--(527, 739]                   711  -10.619   0.025
     ¦   ¦   °--(739, 785]                       759   -12.84    0.05
     ¦   °--(785, 1228]                         1199    2.848    0.02
     °--(1228, 2000]                            1340  142.196   0.005
         ¦--(1228, 1340]                        1279    2.301   0.005
         ¦   ¦--(1228, 1279]                    1253   -1.059   0.005
         ¦   ¦   ¦--(1228, 1253]                                     
         ¦   ¦   °--(1253, 1279]                                     
         ¦   °--(1279, 1340]                    1317  -26.685    0.31
         °--(1340, 2000]                        1688   37.242   0.005
             ¦--(1340, 1688]                    1429   10.582   0.005
             ¦   ¦--(1340, 1429]                1384   -2.852   0.005
             ¦   ¦   ¦--(1340, 1384]            1360   -6.443    0.02
             ¦   ¦   °--(1384, 1429]            1404   -1.174   0.005
             ¦   ¦       ¦--(1384, 1404]                             
             ¦   ¦       °--(1404, 1429]                             
             ¦   °--(1429, 1688]                1494    8.805   0.005
             ¦       ¦--(1429, 1494]            1455  -17.805    0.26
             ¦       °--(1494, 1688]            1632    2.709    0.04
             °--(1688, 2000]                    1822   45.679   0.005
                 ¦--(1688, 1822]                1735   12.374   0.005
                 ¦   ¦--(1688, 1735]            1708  -13.261   0.975
                 ¦   °--(1735, 1822]            1771   13.194   0.005
                 ¦       ¦--(1735, 1771]                             
                 ¦       °--(1771, 1822]        1801  -18.571    0.62
                 °--(1822, 2000]                1872   12.889   0.005
                     ¦--(1822, 1872]            1844    3.874   0.005
                     ¦   ¦--(1822, 1844]                             
                     ¦   °--(1844, 1872]                             
                     °--(1872, 2000]            1898   -7.626     0.1

Thanks,

Harry

newtonharry avatar Sep 26 '24 07:09 newtonharry