How does Netflix learn what movies a person likes? How do computers read handwritten addresses on packages, or detect faces in images? Machine learning is the practice of programming computers to learn and improve through experience, and it is becoming pervasive in technology and science. This course will cover the mathematical underpinnings, algorithms, and practices that enable a computer to learn. Topics will include supervised learning, unsupervised learning, evaluation methodology, and Bayesian probabilistic modeling. Students will learn to program in Python and apply course skills to solve real-world prediction and pattern recognition problems. Programming intensive.

Instructor | Dan Sheldon dsheldon (at) mtholyoke.edu |

Lecture | Tuesday, Thursday 11:30am–12:45pm |

Fourth Hour | Friday 3:15pm–4:05pm |

Location | Carr 102 |

Piazza | https://piazza.com/mtholyoke/fall2016/cs335 |

Moodle | https://moodle.mtholyoke.edu/course/view.php?id=10046 |

Textbook | none |

Office Hours | (tentative) Tuesday 4–5, Thursday 1–2, Clapp 200, or by appointment |

- CS 211 Data Structures
- Math 232 Discrete Math
- Math 101 Calculus I (or equivalent)

The goal of these prerequisites is to ensure that you are: comfortable programming in some language; familiar with basic CS paradigms; know elementary probability and calculus; and are generally comfortable with mathematical tools and reasoning.

There is **no required textbook** for this course. Here are some useful resources:

- An Introduction to Statistical Learning by James, Witten, Hastie, and Tibshirani: accessible undergraduate ML textbook with statistics focus.
**Freely downloadable.** - Introduction to Machine Learning by Alpaydin: approachable undergraduate ML text with CS focus.
- Artificial Intelligence: A Modern Approach by Russell and Norvig: the most widely-used AI textbook. Chapters 13–15, 18, and 20 cover material related to machine learning.
- Pattern Recognition and Machine Learning by Bishop. Graduate / advanced undergraduate level ML text with a probabilistic / Bayesian focus.
- Machine Learning: a Probabilistic Perspective by Murphy. Comprehensive new ML textbook at graduate / advanced undergraduate level.
- The Elements of Statistical Learning by Hastie, Tibshirani, and Friedman. Graduate level statistical view of many machine learning topics.
**Freely downloadable.** - Coursera Machine Learning course by Andrew Ng: outstanding free online ML course.
- Course handouts from Stanford CS 229 by Andrew Ng

The books above that are not freely downloadable (Alpaydin; Russell and Norvig; Bishop; Murphy) are on three-hour reserve at MHC library.

Programming assignments will use Python, NumPy, and SciPy. The **required Python environment is the Anaconda 4.1.1 distribution of Python 2.7.** We will not help grade or debug work unless you are working in this environment. Anaconda 4.1.1 isinstalled on lab computers in Clapp 202 and Kendade 307. You are also encouraged to download and install it on your personal computer.

Please see this page on getting started with Python for CS 335.

Here are some **general / comprehensive** resources on Python and SciPy:

- Google’s Python class
- Norm Matloff’s Fast Lane to Python
- Introduction to Python for Computational Science and Engineering by Hans Fangohr
- The SciPy Lecture Notes
- The Python Tutorial

Here are some more **focused** Python resources oriented toward a class like ours:

The goals of the course are

- To understand the basic building blocks and general principles that allow one to design machine learning algorithms
- To become familiar with specific, widely used machine learning algorithms
- To learn methodology and tools to apply machine learning algorithms to real data and evaluate their performance

Like many ML courses, this one is organized primarily as a sequence of specific techniques (see the schedule), which comprise a small subset of the available machine learning algorithms. We will learn about details of these specific techniques and also use them to explore cross-cutting concepts:

**Mathematical tools**: probability, matrix and vector manipulation, geometry of machine learning problems, basic optimization**Machine learning principles**: problem formulations, notation, overfitting, regularization**Methodology**: evaluation, parameter tuning, model selection, diagnosing and controlling overfitting**Applications**: different applications of ML; the “messy” stuff: data preparation, feature engineering, feature normalization

The skills learned in this class will prepare the student to explore much more widely within the field of machine learning.

The coursework will consist of:

- 4–5 homework assignments
- two quizzes
- a final project

The grading breakdown is:

- Homework: 40%
- Project: 30%
- Quiz 1: 10%
- Quiz 2: 10%
- Class participation: 10%

Homework will be assigned and due every 1–2 weeks during the first part of the semester. They will be a mix of written problems, programming exercises, and experiments. Later in the semester, assigned work will shift toward the final project.

All homework will be submitted electronically through moodle. Written work should be scanned and submitted as a pdf. Specific instructions will accompany each assignment.

- Students have three free late days to be used on
**homeworks only**. - Each late day buys exactly 24 hours from the original due date (so 24.5 hours = 2 late days).
- If you use up your late days, you will be penalized 33% of the assignment’s value for each day or fraction thereof that it is late (0–24 hours = 33% penalty; 24–48 hours = 66% penalty; 48+ hours = no credit).
- An assignment is considered late until all components (written and digital) are submitted.

Collaboration on assignments is encouraged. However, **every student must write their own code, run their own experiments, and write their own solutions**. Sharing of code or written solutions will be considered a violation of the honor code. Also, I highly encourage each student to first attempt problems on their own, especially for the shorter exercises that are designed to test and reinforce concepts taught in class. Please write the names of all collaborators at the beginning of the written portion of the submission.

Students will work as individuals or in small groups on a final project. This can be either a hands-on application of machine learning algorithms learned in class to an interesting data set, or an in-depth exploration of a machine learning topic not covered in this class. Details will be announced later in the course.

We will use Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates and the instructor. Rather than emailing questions, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com.

Find our class page at: https://piazza.com/mtholyoke/fall2016/cs335

Students are encouraged to help answer each other’s questions on Piazza. I will also monitor the discussion and answer questions. So, you are likely to get an answer very quickly. The official policy is that the instructor will read and respond (as necessary) to new posts within 24 hours on weekdays, and 48 hours on the weekend. I will not respond after 9pm.

Participation includes arriving on time to class and required fourth hours, engaging meaningfully in lecture activities (e.g., peer discussions or exercises), giving a project presentation, and contributing in the way you are most comfortable to course discussions during lecture or on the class forum.

If you have a disability and would like to request accommodations, please contact AccessAbility Services, located in Wilder Hall B4, at (413) 538-2634 or accessability-services@mtholyoke.edu. If you are eligible, they will give you an accommodation letter which you should bring to me as soon as possible.