Our KDE exposition follows Hastie et al.’s The Elements of Statistical Learning, Chapter 6. (You don’t need the book; this is in case you want to read more)