ThresholdNLeafs defines the threshold number of leafs in the tree that determines if AddBatch will work in memory or in disk. It is defined when calling NewTree, and if set to 0 it will work always in disk.