The ability to read and write are obvious fundamental skills critical to all academic and quantitative pursuits. Fast approaching this level of fundamental importance is the ability to write computer programs to analyze and manipulate data sets ever increasing in richness and size. This skillset is necessary to work with a wide array of systems whose models and behavior are sufficiently complex to make analysis by hand intractable.
In this course you will translate problems into code applying modern approaches for data analysis, statistical inference and modeling to various levels of neural systems and their component behavior. We will use Python as a coding environment, and you will be exposed to resources and options for scientific computing.
Although geared for neuroscience, the approaches covered in this course are highly salient for a wide array of applications.
We will cover a wide array of topics rather than explore any one topic in great detail. Topics will be introduced at a level where you should be able to understand each concept and put them to use. However, realize up front that we may have only scratched the surface.
The goal of the course is to give you enough of a basic toolset that you will have the necessary foundation to develop programs for any concept that you understand.
There are no prerequisites for the course. However, you are expected to be familiar with basic mathematical functions and concepts, and you will be asked to perform quantitative calcualtions.
- You must bring a laptop to class for hands on participation. If you do not own a laptop, contact your department or the College of Natural Sciences to obtain a loaner for the duration of the course.
- Install Python on the laptop you will bring to class (see instructions below).
- Attend class both motivated and prepared to work hard!
- Conduct yourself in a respectful manner at all times.
- Have fun!
- Time: TR 2:00-3:30 PM
- Location: Online ONLY via Zoom. See course Canvas page for Zoom links.
- Instructor: Marcel Goldschen-Ohm
- Office hours: T 3:30-5:00 PM (see Canvas announcement for Zoom link)
- Email: [email protected] (!!! Please include
neu365-2021
orneu385-2021
in the subject line)
- TA: Tony Dutcher
- Office hours: F 9:00-10:30 AM (see Canvas announcement for Zoom link)
- Email: [email protected] (!!! Please include
neu365-2021
orneu385-2021
in the subject line)
!!! POST YOUR QUESTIONS ON CANVAS where either myself or your fellow students can help. I may not reply immediately as advice from fellow students can often be the most illuminating.
It is perfectly fine to work with your fellow students or anyone else on the homework assignments. If you do so, please include a note on your assignment indicating with whom you collaborated. Any academic dishonesty such as copying a fellow students assignment without collaborating in its completion will be severly punished as outlined by the University. Most importantly, the ability to solve problems such as those in the homeworks is exactly the skillset you are here to obtain. By not practicing these skills, you are primarily hurting yourself.
- Students with disabilities may request appropriate academic accommodations from the Division of Diversity and Community Engagement, Services for Students with Disabilities (471-6259).
Weekly homework will be worth 1/2 to 2/3 of your grade (TBD). A midterm and final exam will make up the rest of your grade.
Most homework will be in the form of Jupyter notebooks. Homework assignments will be posted on Canvas where you will be required to upload the completed notebook file. your_full_name.ipynb
.
- ✏️ Due Jan-29: lists
- ✏️ Due Feb-05: numpy and pandas
- ✏️ Due Feb-26: random walks
- ✏️ Due Feb-26: algorithms
- ✏️ Due Mar-05: probability distributions
- ✏️ Due Mar-12: hypothesis testing
- ✏️ Due Mar-23: bootstrap confidence interval (EXTRA CREDIT)
- TBD (see Canvas)
29 lectures, Midterm exam, Final exam
-
Jan-19: Introduction to programming, Python, and Jupyter notebooks
- You will appreciate the need for programming in modern neuroscience.
- You will be introduced to some good rules of thumb for programming.
- You will be able to run Python code in the Jupyter notebook environment.
- You will be able to assign variables.
- You will be able to logically compare variables and values.
- You will understand Python code blocks.
- You will understand how code blocks can be nested.
- You will be able to conditionally execute code blocks.
-
Jan-21: Lists and loops
- You will be able to index into lists.
- You will be able to edit lists.
- You will be able to iterate over lists.
- You will understand the difference between a reference and a copy.
-
Jan-26: NumPy
- You will be able to import and us the numpy module.
- You will be able to manipulate multi-dimensional data arrays using NumPy.
- You will be able to time your code.
- You will appreciate that without NumPy, Python would NOT be a very useful language for data analysis.
-
Jan-28: Pandas
- You will be able to visualize and manipulate tablular data similar to that in a spread sheet.
- You will be able to convert data back and forth between standard spread sheet files and Pandas.
-
Feb-02: Visualizing data
- You will be able to visualize data with basic plots using Matplotlib.
-
Feb-04: Random walks
- You will be able to generate random numbers.
- You will apply everything you've learned up to this point to simulate random walks in various dimensions and visualize them.
- You will appreciate the role of randomness in molecular diffusion.
-
Feb-09: Functions, classes and modules
- You will be able to understand and write your own Python functions.
- You will understand the basics of Python class objects.
- You will be able to write and use your own classes.
- You will understand the basics of Python modules.
- You will be able to write and use your own modules.
-
Feb-11: Algorithms, pseudocode and optimization with Numba
- You will practice writing pseudocode for several algorithms.
- You will practice translating your pseudocode to code.
- You will be able to use Numba to potentially accelerate your functions.
-
Feb-16: CANCELED DUE TO WINTER STORM
-
Feb-18: CANCELED DUE TO WINTER STORM
-
Feb-23: CANCELED DUE TO WINTER STORM
-
Feb-25: Probability distributions of random variables
- You will understand the difference between discrete and continuous probability distributions.
- You will understand the difference between a probability and a probability density.
- You will be able to use the SciPy stats module to work with probability distributions.
- You will know under what circumstances you might apply binomial, Poisson, exponential or normal distributions.
-
Mar-02: Hypothesis testing
- You will understand the difference between a population distribution and a distribution of sample statistics.
- You will be introduced to the Central Limit theorem.
- You will be able to compute a p-value and understand what it means.
- You will appreciate that statistical inference does not imply certainty.
- You will be able to compare normal-ish distributions using t-tests.
- You will be able to test for differences in two samples using a permutation test.
-
Mar-04: Hypothesis testing and Bootstrap
- You will be able to test for differences in two samples using a permutation test.
- You will be able to generate bootstrap confidence intervals.
-
Mar-09: Time series, Fourier transform, convolution and filtering
- You wil understand the difference between a time series and a distribution of random values.
- You will be able to use a Fourier transform to see the frequency representation of a time series.
- You will be able to visualize a time series as a spectrogram.
- You will understand the importance of sampling and aliasing artifacts.
- You will be able to convolve and filter a time series.
-
Mar-11: MIDTERM EXAM
-
Mar-16: SPRING BREAK
-
Mar-18: SPRING BREAK
-
Mar-23: Curve fitting and Maximum likelihood estimation
-
Mar-25: Hidden Markov models
-
Mar-30: Hidden Markov models
-
Apr-01: Hidden Markov models
-
Apr-06: Linear regression
-
Apr-08: Multiple linear regression
-
Apr-13: Ridge and lasso regression
-
Apr-15: Cross validation
-
Apr-20: Nonlinear regression
-
Apr-22: Classification
-
Apr-27: Principal component analysis
-
Apr-29: Principal component analysis
-
May-04: TBA
-
May-06: TBA
-
May-??: FINAL EXAM
- Get the Anaconda Python distribution (latest version 3.x) from https://www.anaconda.com/download and just follow the install steps. Anaconda comes with a bunch of useful scientific libraries such as Numpy and Scipy that you would otherwise have to install yourself.
- [Hopefully this step is no longer necessary, but I'll leave these instructions just in case.] !!! MacOS Catalina ONLY !!! If you are running MacOS Catalina, you might run into this problem: Anaconda creates a
.bash_profile
file in your home directory that needs to be renamed to.zprofile
in Catalina (does NOT apply to older versions of MacOS). - Launch Anaconda Navigator. Install JupyterLab and Spyder via the widgets in the Home tab. JupyterLab is a web-based python notebook and Spyder is an environment for running Python that is similar to MATLAB.
- Get R from https://cran.revolutionanalytics.com/index.html and run the installer.
- Get RStuio Desktop from https://www.rstudio.com/. This is an environment for running R that is similar to MATLAB.
I recommend just following the instructions at https://docs.junolab.org/latest/man/installation/. Get the latest stable release. I also recommend installing the Atom editor and Juno IDE.
UT students have free access to MATLAB.
- Go to www.mathworks.com and create a user account. Your username MUST be your UT email address!
- Go to UT Service Now and request MATLAB. Click the Request button in the MATLAB for Students Only box near the bottom of the page. Your request may take a day or two to process, so don't delay.
- Sign in to your mathworks account and you should see a license from UT is available to you. Use that license to download MATLAB (latest version). Then run the installer. If you can afford the space (>20 GB) get all the toolboxes that you can. If not, get at least those toolboxes listed at https://www.mathworks.com/products.html under the MATLAB product family sections 'Math, Statistics, and Optimization', 'Signal Processing', 'Image Processing' and 'Computational Biology'.
Note, once you've registered you can also use MATLAB via an online interface that mimicks the application environment at https://matlab.mathworks.com.
- Go to https://github.com and create an account if you don't already have one.
- Go to https://desktop.github.com and download the GitHub Desktop app.
- Open the app and select File->Clone Repository. Select URL and enter the URL of this repository (https://github.com/marcel-goldschen-ohm/NEU-365P-385L-Spring-2021), then click 'Clone'. This will download all of the files in this repository to a folder on your computer. To navigate to the folder from GitHub Desktop select Repository->Show in Finder (that's for MacOS, wording may differ on Windows machines).
- Whenever you want to make sure that you have the latest version of all files in the repository, select Repository->Pull to download ONLY what has changed since the last time you downloaded the repository.
- To make sure you do not overwrite any homework assignment files, I recommend copying all of the homeworks into a separate folder on your computer rather than editing the files directly in the GitHub repository folder.
- Python Challenges: Fun! Will test your Python skills.
- Computational and Inferential Thinking: Quick course on statistics and Python with examples. This is a good place to start.
- Python Data Science Handbook: Explanations and examples. This is also a good first learning tool.
- Computational Statistics in Python: Great collection of references with examples. Highly recommend! Mostly for reference and code examples, but they're very useful.
- Statistics Done Wrong: MUST READ!!!
- Modern Machine Learning Algorithms: Strengths and Weaknesses Breif overview of some machine learning algorithms with strengths and weaknesses to put them in context.
- An Introduction to Statistical Learning: Nice intro to fairly complex statistical methods with very little math. Highly recommend! Example code is in R, but explanations are helpful in general. Note that this is a bit longer and more indepth than the options above. This is more about understanding statistical methods than coding.