I have a few extensions and variations on the previous example that you can try, to test your understanding:
- (From same questioning reader as before, now revealed to be Health Metrics PhD student David Phillips)
How does it work with more than two dimensions? I presume model.tree just gets really crazy with more if-else’s?
The great thing about computer research is that you can experiment with this at no additional cost. Give it a try in 3-d (and let me know if you make a nice visualization of it!), and give it a try in 10-d or something even more imposing.
- Note that the tree.py file where the tree_learner class is housed also contains a class called stump_learner. Give that a try, and figure out what it is doing. It is pretty simple, but we can make it into something complicated soon.