Table of Contents
🌏 中文版
The official handout is titled Homework 2: Decision Trees and contains written plus programming work. Written sections cover function approximation, tree calculations, pseudocode, and empirical questions. Programming has an inspection.py entropy/majority-error tool and a decision_tree.py learner, predictor, evaluator, and tree printer. The ZIP supplies a decision_tree.py starter, heart/purchase/small datasets, and small depth-3 reference labels, metrics, and inspection output.
Why the assignment is ordered this way
Hand calculation exposes why a feature wins. Code exposes stopping rules, tie-breaking, and depth limits. Draw the small-data tree first and require the program to produce the same structure before tuning anything.
First executable action and completion
First create the inspection program and run the handout command:
python inspection.py small_train.tsv small_inspect.txt
Completion means matching the public inspection reference plus depth-3 labels, metrics, and printed tree, then passing your own separable, identical-feature, and tied-gain cases. Gradescope still evaluates private data.
References
Loading...