Exploring Decision Trees with Matryoshka
summary
Automatic decision trees predict Titanic survival using Scala and Matryoshka by turning a Tree into a higher-kinded type, applying Fix and a Functor, then building with an entropy-minimizing ID3-style split. Baselines: “everyone died” yields ~63% accuracy; a simple gender split improves accuracy by ~10%; the full entropy-built tree performs ~2% worse (overfitting). Implementation uses recursion schemes (ana/cata/hylo), exposes stack-safety limits in Matryoshka, and suggests random forests to reduce overfitting.
AI-written summary · about
chapters (10)
- 0:00Introduction to the topic
- 1:53Titanic prediction problem
- 7:53Building decision trees
- 11:09Implementing recursive trees
- 13:57Entropy and automation
- 19:36Recursion schemes introduction
- 26:40Anamorphisms with entropy
- 32:23Exploring tree paths
- 36:22Catamorphisms and hylomorphisms
- 44:17Conclusion and Q&A
related talks
44mA Practical-ish Introduction to Data Science
06mPërdorimi i Decision Trees dhe të dhënat për të marrë vendime
47mA Practical(ish) Introduction to Data Science
45mTop 10 Machine Learning Gotchas
14mLearning the Ropes of Synthetic Data
58mImproving disaster response with machine learning
31mBeyond the Black Box: Interpreting ML Models with SHAP
35mTowards Interpretable Data Science
