I would only add the value field if the node is a leaf. Otherwise, the actual value at `tree_.value[i]` is undefined. 

(and also remove feature, threshold, left, and right fields at leaves - since they don't make sense for these nodes)