Class comparing change in EMP under COPERR from merging 2 nodes. More...
Class comparing change in EMP under COPERR from merging 2 nodes.
Under COPERR, EMP is -1/n^2 x sum over leaves of (counts in leaf squared / volume of leaf) where n is the total number of data points in the histogram
For two subleaf nodes we are comparing change in the sum over leaves of (counts in leaf squared over volume of leaf) which would result if each node were to be the one to be merged.
Merges take from the left of the queue first ("smallest")
The smaller (more negative) the value returned by getMergeChangeEMPCOPERR(), the more a node will reduce or least increase the overall EMP by being merged, so it should be lower, ie more to left, in the ordering.