This post is based on the content from Lecture 10: Regression Trees - Cosma Shalizi