See rcATT issue for explanation: https://github.com/vlegoy/rcATT/issues/4 basically, there is a small bug in the `hanging_node()` function. A k needs to be changed to a j. I also improved efficiency a lot. in your training.ipynb you copied their code. just a small FYI