More efficient calculation: no need to traverse tree, just use splits dictionary