These notes grew out of my work as a teaching fellow for machine-learning courses at Yale, with John Lafferty and Andre Wibisono. They cover the models, probability, and optimization ideas that also appear in my research. Corrections and questions are welcome.