Open dan-knight opened 1 year ago
Generally, I'd lean against silently changing the input data with no warning or error. If we want to keep the default behavior of re-arranging the nodes despite the given parent-child relationships, I'd suggest documenting this explicitly and showing a warning when it occurs.
Nodes are reordered by CP, but a node whose CP is larger than its parent will swap positions in the tree (essentially swapping parents). In reality, this should probably generate an error, as a child node cannot be more prevalent than its parent. However, this may be a grey area. (@yashpatel6, @whelena, any thoughts?)
Reordering node names by CP (when no labels are provided) seems logical, and was the intended functionality. This seems to be a bug related to indexing the values themselves.