Learning Machines
Taught by Patrick Hebron at ITP, Fall 2015
Overview:
This half-semester course aims to introduce machine learning, a complex and quickly evolving subject deserving of a far more intensive study. The goal of this course will be to open a preliminary investigation of the conceptual and technical workings of a few key machine learning models, their underlying mathematics, their application to real-world problems and their philosophical value in understanding the general phenomena of learning and experience.
Primary Sources:
Before an advancement in machine learning is distilled into textbooks, tutorials, blogs and open-source implementations, it is generally introduced in the form of an academic research paper. Many of these papers can be found at Arxiv and the other sites listed in the Academic Research Tools section below. These documents are not easy to read - they often describe ideas using mathematical nomenclature and assume that the reader is already familiar with the subject. Yet, these research papers are the best way to access the current cutting edge within machine learning. For this reason, it is important to become familiar with the format and decyphering its contents. To aid this process, we will read and discuss a primary source research paper each week. The primary source readings are labeled as such in the syllabus below.
Resources:
Required Text:
- Anderson, Britt. Computational Neuroscience and Cognitive Modelling: A Student's Introduction to Methods and Procedures. Los Angeles: SAGE, 2014.
Python Installation Resources:
Python Resources:
Math for Machine Learning:
Academic Research Tools:
Going Further:
Syllabus:
Week 1:
Class:
- Introductions
- Discussion:
- Philosophical Framework:
- Categories of Machine Learning (Overview):
- Supervised Learning
- Semi-Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
- Machine Memorization vs. Machine Learning:
- Logical Truth Tables (AND, OR, XOR, etc)
- Lookup Tables
- Encoding schemes:
- Run-length encoding (RLE)
- Getting Started in Python:
- Installation
- Variables
- Lists
- Loops
- Conditionals
- Functions
Homework:
Assignment:
- Implement Run-length encoding in Python. A decoder implementation is optional, but give it a shot.
Readings:
Optional:
Week 2:
Class:
- Discussion and Questions:
- Run-length encoding homework
- Primary Source reading
- A very brief tour of two related studies:
- Dimensions from 1 to N:
- Spatial dimensions
- Abstract dimensions
- The Pythagorean theorem and Euclidean distance
- A few applications of distance metrics:
- Gesture recognizers
- Recommendation engines
- Linear Algebra Primer (Part 1):
- Vector definition, notation, properties and common operations
- Working with vectors in Python and NumPy
Homework:
Assignment:
- Implement a simple recommendation engine in Python. The Programming Collective Intelligence chapter listed below provides a complete solution, but please use this code only as a reference. Try implementing your recommendation engine with NumPy's vector tools.
- Spend some time experimenting with vectors in Python and NumPy. Try out the operations we've discussed: plug in different values and vector dimensions, consider the results, tweak the values and repeat. The more you play with these operations, the more intuitive they will become.
Readings:
Week 3:
Class:
- Discussion and Questions:
- Recommendation engine homework
- Primary Source reading
- Getting Started with Plotting in Python and Matplotlib
- Learning to draw a line in the sand:
- A brief look at k-means clustering:
- Classification as spatial partitioning
- Perceptrons:
- Historical overview
- The Perceptron Model
- Biological and electrical analogies
- Activation Functions
- Biases
- Training algorithm
- Limitations of the Perceptron model:
- The XOR problem
- Linear separability
- Discussion:
- What do these limitations tell us about the nature of learning?
- What conceptual alterations to the model might help to address these limitations?
Homework:
Assignment:
- Implement a Perceptron in Python.
Readings:
Week 4:
Class:
- Discussion and Questions:
- Perceptron homework
- Primary Source reading
- Linear Algebra Primer (Part 2):
- Matrix definition, notation, properties and common operations
- Working with matrices in Python and NumPy
- Calculus Primer:
- Multilayer Perceptrons:
- Learning as error correction
- Multilayer Perceptron Model
- Backpropagation Algorithm
Homework:
Assignment:
- This week, I will provide an "unrolled" Multilayer Perceptron implementation in Python. This code implements a three-layer MLP (input, output and one hidden layer) in an easy-to-read format, but does not attempt to provide a generalized architecture for adding additional hidden layers, etc. Using this code as a starting point, please implement a more generalized solution. Your code should allow the user to specify the size of each layer and the number of hidden layers as well as provide a clear API for training and testing the model on user-provided datasets.
- Code: mlp_unrolled.py
Readings:
- Computational Neuroscience and Cognitive Modelling, Chapter 2: "What Is a Differential Equation?"
- Computational Neuroscience and Cognitive Modelling, Chapter 3: "Numerical Application of a Differential Equation"
- Primary Source: Reducing the Dimensionality of Data with Neural Networks by Geoffrey Hinton and R. R. Salakhutdinov
Optional:
Week 5:
Class:
- Discussion and Questions:
- Multilayer Perceptron homework
- Primary Source reading
- General Methodology for Working with Neural Networks:
- Identifying a "learning problem"
- Developing a network architecture
- Developing the training procedure
- Validating the learning model
- Working with Data:
- Activation functions and numeric domains
- Regression & Classification (Real-valued and Indexical Data)
- One-hot and One-cold encodings
- Slicing and time windows
- Splitting datasets for training and testing
- Choosing representative datasets
- Practical limitations in supervised learning
- Index, Icon and Symbol:
- The abstract representation of ideas
- Charles Peirce's Theory of Signs
- Unsupervised Learning:
- Conceptual overview
- Learning as imitation
- Autoencoders and emergent encoding schemes
- Applications of dimensionality reduction
Homework:
Assignment:
- Using your Multilayer Perceptron implementation from last week, identify a learning problem and dataset that is of interest to you, determine how to integrate this data with the MLP implementation and write any code necessary to train and test the MLP on your data. The UC Irvine Machine Learning Repository contains a number of interesting sample datasets to get you started. The Awesome Deep Learning resource list also links to a wide assortment of datasets.
Readings:
Optional:
Week 6:
Class:
- Discussion and Questions:
- Multilayer Perceptron applications homework
- Primary Source reading
- Unsupervised Learning:
- Restricted Boltzmann Machines:
- Architectural overview
- Persistent Contrastive Divergence
- Contrastive Divergence
- Implementation:
- Deep Belief Networks:
- Architectural overview
- Integrating supervised and unsupervised learning
- Discussion:
- Phenomenological implications of Deep Learning
Homework:
Assignment:
- Final assignment: Identify an applied learning problem that is of interest to you. Consider the problem, what sort of learning algorithm you would use to address it, what auxillary tools would be needed and so forth. Try to identify challenges, limitations, etc. Also, do some research into if/how others have tried to solve a similar problem. What tools did they use? Put together a brief presentation that describes your idea and outlines what further research and implementation work would be required to realize this idea. Alternately, you can implement a solution yourself, though this is not required.
Readings:
Week 7:
Class:
- Discussion and Questions:
- Discussion of other learning models and their applications:
- Student Presentations
- Follow-up Discussion:
- Final Thoughts