ecmwf / ecpoint-calibrate

Interactive GUI (developed in Python) for calibration and conditional verification of numerical weather prediction model outputs.
GNU General Public License v3.0
21 stars 8 forks source link

Issues with the WT codes #161

Closed FatimaPillosu closed 3 years ago

FatimaPillosu commented 3 years ago

Hi @onyb, there is a problem with the WT codes that @Esti, @AugustinVintzileos and @ATimHewson found out yesterday. As you create the DT, the codes of the WTs change in a funny way. If I have the root with the code 00000, and I split it into two nodes with the code 10000 and 20000, the code for the root changes to 20000. This should not happen. This problem happens at every node, not only the root. Could you please check this issue? I don't know how this might be influencing the creation of the WTs so I'll put this issue as priority 1. Cheers, Fatima

onyb commented 3 years ago

Update: This is indeed a bug that I managed to trace to the construction of the decision tree. It's unlikely that this is a regression. I am coming up with an alternative algorithm (using recursion).

According to my assessment, the bug is limited to mislabeled non-leaf nodes and doesn't impact the correctness of mapping functions. I implemented an exhaustive unit-test to ensure the tree construction doesn't break after the proposed fix.

onyb commented 3 years ago

Fixed in v0.24.0.