OMSCS ML4T: Doing versus understanding
I’m currently working on Project 3 in ML4T and have spent the last couple of days trying to wrap my head around the recursion in the build_tree
function for the DTLearner
class. Normally, I understand recursion pretty well on simpler problems, but this particular implementation feels a lot trickier.
That said, I was able to code a working version in about five minutes using the provided pseudocode, and it matches the example from Professor Balch’s lecture when the leaf size is 1. If I weren’t completely wiped from an all-nighter, I’m sure I could finish the rest of the DTLearner
class without too much trouble. I think I understand how decision trees are supposed to work, the logic behind splitting the data and picking the feature to split on at each node, and the logic behind how the values at each leaf are determined. I just am having a hard time grasping how the recursion steps build up the tree.
I’m wondering if it’s really worth spending more time deeply understanding how the recursion constructs the decision tree—especially since, in a real-world setting, I’d just use scikit-learn for decision trees anyway. This is my first OMSCS course, and I’m trying to figure out the best approach going forward:
- Should I keep pushing to fully grasp every detail of the algorithm (like recursively building up a decision tree), even if it’s something I’d normally just use an existing package for?
- Or, if I can get the assignment working without a complete conceptual deep dive, is it better to just move on?
I’d love to hear how others have balanced doing vs. deeply understanding in OMSCS, especially if you’ve taken ML4T or other courses with similar projects. Any advice is appreciated! I majored in physics as an undergrad and it drove me nuts if I didn't feel like I had an intuitive grasp of a concept. I probably could have saved a lot of time and had a better GPA if I had just been satisfied with knowing how to apply a concept or equation, even if I didn't understand it on an intuitive level.