brandmaier / semtree

Recursive Partitioning for Structural Equation Models
https://brandmaier.github.io/semtree/
GNU General Public License v3.0
13 stars 11 forks source link

renaming of stripTree #42

Closed brandmaier closed 2 years ago

brandmaier commented 2 years ago

The package has a function to remove information from trees to reduce their memory footprint, e.g., it may removes the fitted model, the datasets, etc. This makes operations on SEM forests more efficient in particular. This function is currently called stripTree(). @cjvanlissa re-implemented this function and called it clear_underbrush(). I want to open the discussion on how to best name this function. I am happy to have a cute name here, which still needs to be informative about what's going on. Clearing the underbrush is neat but my image here is more that we do something to every branch and every leaf. The metaphor of pruning is already used for cutting back entire branches. So, what about a function called exfoliate()? Or do we just stick with the old name? Specifically asking for opinons of @manuelarnold and @cjvanlissa. Thanks!

manuelarnold commented 2 years ago

I like clear_underbrush() and exfoliate a lot. However, I think it is possible that all of them could be confused to be some type of pruning function. Personally, I would prefer a name like clear_memory() or free_memory(). These are boring names but they contain the keyword memory, making them easy to find and remember.

brandmaier commented 2 years ago

Thanks for this suggestion, @manuelarnold! To me, "memory" sounds too much like a system-level call. If I google "stripped tree", I pretty much get what my mental image is of the respective semtree object :-D

cjvanlissa commented 2 years ago

How about bonsai() :p I see the problems with naming. stripTree() is currently not a user-facing function, so we can do what we want with it. If we want to use this, I think the function should be called strip() though, and have methods for trees and forests.

brandmaier commented 2 years ago

wonderful! I agree that the function would better be called strip() than stripTree() as it is more generic. Relatedly, we need to think about the name for the resulting object, which now is a semtree_light. If we stick with strip(), we could increase consistency by naming the class semtree_stripped or stripped_semtree.

cjvanlissa commented 2 years ago

Agreed! I vote semtree_stripped and semforest_stripped

brandmaier commented 2 years ago

Thanks for sharing your views. We'll go with semtree_stripped and semforest_stripped as new class names

brandmaier commented 2 years ago

closed by https://github.com/brandmaier/semtree/commit/c4af4870395c533bd8756a92a2e01615ad1dc0c0