Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
Skip to content

bordeaux-neurocampus/CNCC-2021-beginner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computational Neuroscience Crash Course 2021 (beginners)

Given the increasing complexity of neural data and the generalized use of theoretical models in neuroscience, more and more neuroscientists rely on computational tools for modelling or data analysis. We would like to offer the possibility to those who feel that their maths / informatics background is a bit short to update their maths and to get familiar with basic techniques for data analysis/modelling using the Python language. The Computational Neuroscience Crash Course (CNCC) will span over two years, with a first part focusing on the maths and programming pre-requisites, and a second part next year on data analysis (and possibly modelling to follow).

For all courses (maths and programming), we'll provide some theoretical background, propose small exercises for participant to work on their own and then solve the exercises together and make sure everybody has acquired the related concepts and techniques. Courses will be taught in English.

Contact



Schedule

This year and due to the pandemic, the whole course will be online. To avoid very long presentations over Zoom, you'll have to read the material in advance. The different topics will be briefly revised during the course. Please have a look at the schedule.

What to prepare before each day:

  1. Monday, July 5th, 2021 (Day #1)
  • Install the necessary software (Jupyter, Anaconda) and the required modules (Scipy, Numpy, Matplotlib). Instructions can be found here.
  • Download the dataset from Figshare. Use the following keywords: songbird, dataset, leblois
  • Watch the videos on Linear Algebra. We will solve some of the exercises on Tuesday (day #2).
  1. Tuesday, July 6th, 2021 (Day #2)

  • Read the notebook on filtering
  • Solve the exercises on Linear Algebra (1-7, or go even further if you can)
  • Read the provided references for signal processing (up to Fourier Transform, which will be covered on Wednesday)
  1. Wednesday, July 7th, 2021 (Day #3)
  • Solve the exercises on Signal Processing

  • Read the provided references on the Fourier Transform
  1. Thursday, July 8th, 2021 (Day #4)
  • Install Pandoc
  • Check if you have nbconvert installed in your environment (you should, if you have jupyter notebook or lab). A further Latex installation might be necessary if you want to export your notebook to pdf.
  1. Friday, July 9th, 2021 (Day #5, final)
  • Work on producing your final report; emphasis on comments and documentation. The final report can be uploaded here.

The (mini) project

The goal of the project is to sort (automatically) audio files that correspond to the recording of adult or juvenile songbirds. If you listen to the audio files, you will hear that the sound is quite different between an adult (song) and a juvenile (babbling). This means we can probably process the audio files in order to decide if it corresponds to an adult or a juvenile and the goal is thus to write a function songsort(directory) that will automatically sort all the files present in some-path and label them accordingly.

For the project, you'll need to team with someone else such as to work together at one computer (pair programming). When one is typing, the other is reading an commenting and for maximum efficiency, you'll have to switch roles frequently. This can be done online by sharing the screen of someone.

For the project, we'll use Jupyter and the provided notebook, which you will complete during the duration of the course.



Mathematics

In this part of the course we will introduce vectors and matrices, how to peform operations (such as addition & multiplication) on these objects, the correspondence with geometry and we will learn to solve a system of linear equations. All the above will be accompanied by an introduction to Linear Algebra using Python.

Prerequisites: None
On-line courses:

We highly recommend you start your study on linear algebra by watching the Essence of linear algebra videos by 3Blue1Brown on YouTube. Emphasis should be placed on chapters 1-11, as these chapters cover all the material you will need to complete this course. Feel free to watch the other videos though, as they are highly interesting!

Exercises: Linear Algebra Exercises Set


We will start by introducing a few basic signals, all in discrete time. We will show examples using Python and go over the Fourier Transform, which is ubiquituous in signal processing. Next, we will introduce spectral analysis and learn how to compute the correlation of signals in order to reveal similarities between them. All this material will be covered in the course of two days (Tuesday and Wednesday).

Prerequisites: None
On-line courses:

You should start by reviewing the following:

  1. What is signal processing, and why do we care? https://www.youtube.com/watch?v=YmSvQe2FDKs

  2. Basic signals and their graphs: https://technobyte.org/signal-systems-types-differences/

  3. Sampling Theorem: https://www.dsprelated.com/freebooks/mdft/Sampling_Theory.html

  4. Wikipedia | Autocorrelation and Wikipedia | Cross-correlation: (in both pages, focus on the case of ‘deterministic signals’ and ignore the case of random vectors). Video explanation and demo : https://www.youtube.com/watch?v=_r_fDlM0Dx0

  5. Fourier transform :

Wikipedia | Fourier Transform (up to 5.1 basic properties)

But what is the Fourier Transform? A visual introduction : https://www.youtube.com/watch?v=spUNpyF58BY

Intuitive definition : https://sites.northwestern.edu/elannesscohn/2019/07/30/developing-an-intuition-for-fourier-transforms/

More complete definition : https://physiology.med.cornell.edu/people/banfelder/qbio/resources_2016/S.2_fourier.pdf

Exercises: Discrete Time Signals Exercises Set




Programming lessons

This lesson aims at providing the student with a clean development environment, including Python installation and essential packages, a decent text editor, and a shell. We'll also introduce the Python & IPython shells, the Jupyter notebook and explains how to run a python script from the command line. In case you cannot install Python/Anaconda in your computer, you can use Google Colab. We've added a short tutorial on how to use Colab in here.

Prerequisites: None
See also: Anaconda installation, Datacamp tutorial for Windows, Datacamp tutorial for MacOS, Miniconda tutorial Windows Miniconda tutorial MacOS, Tutorial on Jupyter Notebooks, A gallery of interesting Jupyter Notebooks, Ten simple rules for writing and sharing computational analyses in Jupyter Notebooks


We introduce here Python, a powerful and easy to learn programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming (Python website). However, we'll only cover the strict minimum necessary for getting started with numerical computing.

Prerequisites: Installation
See also: Official Python tutorial, Dive into Python, Learn Python


This lesson gives an overview of NumPy, the core library for performant numerical computing, with support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.

Prerequisites: Introduction
See also: Scipy Lecture Notes, Numpy for Matlab users, From Python to Numpy, Numpy Absolute Beginners


We'll explore the matplotlib library which is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter notebook, web application servers, and four graphical user interface toolkits.

Prerequisites: Numerical computing
See also: Matplotlib tutorial, Ten Simple Rules for Better Figures


This lesson, from the scipy mlecture notes, will cover scipy which is a scientific-computing libraries, such as the GSL (GNU Scientific Library for C and C++), or Matlab’s toolboxes. Scipy is the core package for scientific routines in Python; it is meant to operate efficiently on numpy arrays, so that numpy and scipy work hand in hand.

Prerequisites: Numerical computing
See also: Elegant Scipy, Python Data Science Handbook, Python SciPy Tutorial - A Guide for Beginners, SciPy Tutorial for Beginners



Open Science & FAIR data

See also: FOSTER, Ouvrir la Science, UNESCO & Open science, FAIR by FOSTER, The FAIR Guiding Principles for scientific data management and stewardship




Useful (optional) material and links

Pt.1 - Linear Algebra

Wikipedia | Linear Algebra

Mathematics for Computational Neuroscience: only Part 1, Chapter 2, 1-3 (ignore the least square approx in 4).

Ch4 Linear Algebra (Owen&Corrado, Stanford U)

Matrices | Introduction, notation, properties


Pt.2 - Signal Processing

A video course on the basics of Fourier transform : https://www.ibiology.org/talks/fourier-transform/

Fourier Theorems and properties : https://www.dsprelated.com/freebooks/mdft/Fourier_Theorems.html

From DFT to FFT : https://www.dsprelated.com/freebooks/mdft/Why_DFT_usually_called.html

To go beyond, the history and many applications of Fourier transforms : http://www.yalescientific.org/2010/12/fourier-transform-natures-way-of-analyzing-figures/

Common applications of the Fourier Transform (Spectrograms) : https://www.dsprelated.com/freebooks/mdft/Spectrograms.html

Autocorrelation : https://www.dsprelated.com/freebooks/mdft/Autocorrelation.html

Crosscorrelation : https://www.dsprelated.com/freebooks/mdft/Cross_Correlation.html

The case of neurons and spikes : https://www.med.upenn.edu/mulab/analysis.html


The provided document covers first-order differential equations (that can describe the evolution of a membrane potential, for example).

Prerequisites: None See also: Wikipedia | Differential Equations & Mathematics for Computational Neuroscience



Computational Neuroscience Crash Course (CNCC 2021)
Copyright © 2021 Arthur Leblois & Nicolas P. RougierCC-BY 4.0 International license.

About

Computational Neuroscience Crash Course 2021 (beginner)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published