Schedule

Outlined below is the schedule for the course, including lecture topics and assignment due dates. All assignments are due at 11:59PM on the date specified. The specific dates of different topics are subject to change based on the pace at which we go through the course.

Since Python is so popular, there has been a ton of community work across many projects. Therefore, a big part of this course will be learning how to leverage work that others have already done, instead of re-inventing the wheel ourselves, by using ``software libraries'' for different tasks. I have indicated the software libraries we will be using in the course at the beginning of each section.



Lecture
Date
Lectures (click for notes)Readings/LinksAssignments/Deliverables

Unit 1: Audio/Image Processing

We will kick off the course by discussing how computers represent audio and images and by doing some fun manipulations of these signals. This will give us an excuse to start getting familiar with scientific Python, and particularly the numpy library. At this point in the course, we can mostly look at Python as a glorified calculator. Aside from basic arithmetic operations and plotting, we will dip our toes into writing functions, which will allow us to organize our code better when performing more complex tasks.

Science Topics

  • Audio processing: Audio sampling, sinusoids, noise, comb filters, aliasing, the Discrete Fourier Transform, convolution
  • Image Processing: Salt and papper noise, dithering, MoirĂ© patterns, linear filters, histogram equalization

Programming Topics

  • Intro to 1D/2D numpy array manipulations
  • Introduction to plotting via matplotlib
  • Intro to function writing and usage

Libraries Introduced

Textbook Reading

Harvey Mudd CS For All Ch. 2

1Wed 1/22/2020Course Sneak PreviewHomework 0: Warmup Out
Sun 1/26/2020Homework 0 Due
2Mon 1/27/2020Software Environment, Arithmetic Operations, Variable Naming, Begin Lists
3Wed 1/29/2020List slicing, Numpy Arrays / PlottingHomework 1a: linspace and sinusoids out
Sun 2/2/2020Homework 1a Due
4Mon 2/3/2020Audio Processing: SinusoidsHomework 1: Audio Processing Out
5Wed 2/5/2020Functions, Echoes/Convolution, Noise, Comb Filters
6Mon 2/10/2020The Discrete Fourier Transform, Begin Image Processing
7Wed 2/12/2020Image Processing: 2D Arrays / Grids, Moiré Patterns, Quantization/DitheringHomework 1 Due
Homework 2: Steganography Out

Unit 2: Particle Simulations

In this unit, we will begin to explore some fundamental programming paradigms that will turn our computer into much more than a basic calculator. In particular, we will study "if/else" statements, which are decisions made at runtime. We will also begin loops, which will make it much easier to repeat the same code over and over again with minor variations. Both of these things will allow us to begin exploring some interesting applications, including fractal generation and simulations of celestial bodies.

Science Topics

  • Fractals, the n-body problem, flocking simulations, chaos

Programming Topics

  • Loops, if statements, parallel arrays

Libraries Introduced

8Mon 2/17/2020Spyder, If Statements
Tue 2/18/2020HW3a: Gregorian Leap Years Out
9Wed 2/19/2020Boolean Statements, Begin LoopsHomework 2 Due
HW3b: The Chaos Game Out
10Mon 2/24/2020While Loops: Epoch Time, The 10 Heads ProblemHomework 3a Due
11Wed 2/26/2020VPython Animations, Euler Steps for Vector Simulations of Gravitation
Fri 2/28/2020Homework 3b Due
Sat 2/29/2020Homework 4: N-Body Problem Out
12Mon 3/2/2020Continue Gravitational Simulations / VPython, Begin Binary Star Simulation
13Wed 3/4/2020Finish Binary Star Simulation, Chaos, The Logistic Map
Fri 3/6/2020Homework 4 Due
Fri 3/6/2020Final Project Initial Proposal Due
--Mon 3/9/2020Spring BreakEnjoy!
--Wed 3/11/2020Spring BreakEnjoy!
14Mon 3/16/2020More spring break, courtesy of COVID-19
Tue 3/17/2020Homework 4b: Epidemic Spreading Out
15Wed 3/18/2020More spring break, courtesy of COVID-19

Unit 3: Data Wrangling / Data Analysis

In this unit, we will learn how to gather and organize data in Python. This will include a brief foray into machine learning to discuss learning from examples, also known as supervised learning. We will use this to guess the genre of a clip of music, to figure out the sentiment of a movie review, and to automatically transcribe images of digits.

Science Topics

  • Web scraping, features for natural languages processing
  • Audio feature design
  • Supervised learning with k-nearest neighbors
  • Dimension reduction for visualization
  • Ridge regression and logistic regression

Programming Concepts

  • File I/O
  • Strings, dictionaries
  • Practice with functions, loops, and numpy arrays
  • Sparse matrices

Libraries Introduced

16Mon 3/23/2020Python Dictionaries, Pickling, Wrangling Twitter Data
Tue 3/24/2020Homework 4b Due
17Wed 3/25/2020Python Dictionaries, Pickling, Wrangling Twitter Data
Fri 3/27/2020Homework 5: Tweet Wrangling Out
18Mon 3/30/2020High Dimensional Data: Pixel Image Embeddings, Audio Features, Dimension Reduction, Multidimensional Scaling
19Wed 4/1/2020Finish multidimensional scaling, argsort/argmin, dictionaries practice
Sun 4/5/2020Homework 5 Due
20Mon 4/6/2020Nearest Neighbors, Digit Classification, Audio Genre Classification
21Wed 4/8/2020Ridge Regression, Text Vectorization, Sparse MatricesHomework 6: Movie Reviews Out

Unit 4: Sequences

In this unit, we will study algorithms that deal with sequences in text and audio. In doing so, we will solidify our understanding of functions and loops by exploring a class of algorithms known as dynamic programming algorithms, which are algorithms that cleverly reuse computation to run more efficiently. This will unlock a series of neat applications, including genome similarity search (aka what's my ancestry?) and audio synchronization (i.e. how to we line up two people singing the same song but at different rates?). After this, we will study Markov Chains and use them to create a program that synthesizes text in a particular style. As the most complex assignment yet, it will require the notion of a "class" (custom variable type with functions) to organize code effectively.

Science Topics

  • Efficient algorithm design with dynamic programming
  • Genetic similarity search strategies
  • Sequential probabalistic modeling and sampling
  • Audio synchronization

Programming Concepts

  • Recursive functions
  • Classes and objects

Libraries Introduced

22Mon 4/13/2020Recursion, The Dynamic Programming Concept
23Wed 4/15/2020Edit Distance
24Mon 4/20/2020Dynamic Programming Solutions To Edit Distance, Needleman-WunschHomework 6 Due
25Wed 4/22/2020Backtracing Alignment Tables, Dynamic Time Warping for Audio Alignment
Fri 4/24/2020Homework 7: Needleman-Wunsch Out
Fri 4/24/2020Final Project Milestone
26Mon 4/27/2020Classes and Objects
27Wed 4/29/2020Markov Chains on Letters
28Mon 5/4/2020Markov Chains And N-GramsHomework 7 Due
Homework 8: Markov Hybrids Out
29Wed 5/6/2020Course Wrapup / Raffle
Fri 5/8/2020Homework 8 Due
30Mon 5/11/2020No class
Tue 5/12/2020Final Project Video / Slide Due
31Wed 5/13/2020No classFinal Project Feedback Due
Thu 5/14/2020Final Project Due