Mathematical Tools for Neuroscience

Princeton University, NEU 314, Fall 2022
Time: Tu/Th 1:30–2:50 pm
Location: Jadwin Hall A06
Instructor: Sam Nastase (snastase@princeton.edu)
AIs: Rober Boshra, Zaid Zada, Wayan Gauthey, David Allen
Syllabus: Syllabus


This course introduces students to the mathematical tools at the core of computational neuroscience research. The course aims to familiarize students with topics in linear algebra, statistics, and machine learning, with a heavy emphasis on applications to neurobiology. Lectures on each topic will develop the relevant mathematical background with links to foundational applications in the field. Coursework will focus primarily on problem sets requiring the implementation of models and analyses in Python. The course will equip students with a practical proficiency in various computational methods, including programming skills in data analysis and visualization that are increasingly important to scientific inquiry in general, and neuroscience in particular.


Lecture schedule

DateTopicSlides/codeHomeworkOptional reading
Tu 9/6Introduction to computational neuroscienceLecture 0Homework 0Q Homework 0AMarr, 1982
Th 9/8Introduction to linear algebra: vectorsLecture 1 Code 1  
Tu 9/13Linear combinations and vector spacesLecture 2 Code 2Homework 1 
Th 9/15Applications: trichromatic visionLecture 3 Code 3 Maxwell, 1857 Kuffler, 1953
Tu 9/20Matrix multiplication, outer product, transposeLecture 4 Code 4  
Th 9/22Row/column/null spaces, linear systemsLecture 5 Code 5  
Tu 9/27Applications: neural population codesLecture 6Homework 2Georgopoulos et al., 1986 Haxby et al., 2001
Th 9/29Singular value decomposition (SVD)Lecture 7 Code 7  
Tu 10/4Principal component analysis (PCA)Lecture 8 Code 8  
Th 10/6Applications: dimensionality reductionLecture 9 Code 9  
Tu 10/11Least-squares regressionLecture 10 Code 10Homework 3 
Th 10/13Applications: univariate regression in fMRILecture 11 Code 11  
Tu 10/18No class (fall recess)   
Th 10/20No class (fall recess)   
Tu 10/25Introduction to probability and Bayes’ ruleLecture 12 Code 12  
Th 10/27Covariance and correlationLecture 13 Code 13  
Tu 11/1Applications: representational geometry and functional connectivityLecture 14 Code 14Homework 4Kriegeskorte & Kievit, 2013 Yeo et al., 2011
Th 11/3Permutation tests and bootstrappingLecture 15 Code 15  
Tu 11/8Information theory and efficient codingLecture 16 Code 16Homework 5 
Th 11/10Overfitting and out-of-sample predictionLecture 17 Code 17  
Tu 11/15Regularized regressionLecture 18 Code 18  
Th 11/17Applications: encoding models in fMRILecture 19 Code 19 Huth et al., 2016
Tu 11/22No class (Thanksgiving recess)   
Th 11/24No class (Thanksgiving recess)   
Tu 11/29Classification and confusion matricesLecture 20 Code 20Homework 6 
Th 12/1Applications: neural decodingLecture 21 Code 21 Norman et al., 2006
Tu 12/6Clustering and mixture modelsLecture 22 Code 22  
Th 12/8Artificial neural networksLecture 23 Code 23  

The content of this course is inspired by related courses designed by Jonathan Pillow, Eero Simoncelli, Michael Landy, Ella Batty, and Tal Yarkoni.


Resources and references

“Welcome to Colaboratory” introduction to browser-based interactive Jupyter Notebooks hosted by Google Colab: Welcome to Colaboratory

Princeton Neuroscience Institute’s handbook for best practices in scientific computing and reproducible neuroscience: Princeton Handbook for Reproducible Neuroimaging

NumPy’s User Guide “Quickstart,” “Absolute Basics,” and “Fundamentals” sections: NumPy User Guide

Pyplot tutorial and Matplotlib’s “Getting Started,” “Tutorials,” and “Examples” documentation: Pyplot tutorial Matplotlib Documentation

Scikit-learn’s User Guide and Examples: User Guide Examples

Managing Python environments and installing software using conda: Conda Documentation PHRN conda guide

Jupyter ecosystem documentation: Jupyter Documentation

Jupyter Notebook introductory documentation: Jupyter Notebook Documentation

Guide to Markdown Cells in Jupyter Notebooks: Jupyter Markdown Cells

Neuromatch Academy course in Computational Neuroscience: Neuromatch

Neurohackademy summer school lectures: Neurohackademy

“Theoretical Neuroscience” textbook by Peter Dayan and Larry Abbott: PDF
— Dayan, P., & Abbott, L. F. (2001). Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. MIT Press.

“Introduction to Linear Algebra” textbook materials available online at Gilbert Strang’s website: website
— Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press.

“Statistics” textbook by Freedman, Pisani, and Purves:
— Freedman, D., Pisani, F., & Purves, R. (2007). Statistics (4th ed.). Norton.

“Permutation Tests” textbook by Phillip Good:
— Good, P. (2000). Permutation Tests: A Practical Guide to Resampling Methods for Testing Hypotheses (2nd ed.). Springer.

“An Introduction to the Bootstrap” textbook by Efron and Tibshirani:
— Efron, B., & Tibshirani, R. J. (1994). An Introduction to the Bootstrap. Chapman & Hall/CRC.

“The Elements of Statistical Learning” textbook available online at Trevor Hastie’s website: website PDF
— Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd ed.). Springer.