16–20 mai 2022
Carry-le-Rouet
Fuseau horaire Europe/Paris

Hands-on session preparation before coming

Hands-on session preparation before coming!

The school will be more profitable if you can run yourself the code during the hands-on session on your own laptop. The three hands-on sessions will be run from python notebooks on GitHub.

In all three cases, the default will be to run on Google Colab (interactive ipython notebooks on Google cloud), for which you'll need a valid Google (or Gmail) account. You may get familiar with Google Colab before coming.

In addition, it will be possible to run at least the notebooks of the second session locally on your laptop, for which you will need to install Anaconda *before* coming. See instructions below.

We will have informal debugging sessions on Monday end of afternoon.

Google Colab

Google Colab or Colaboratory is a cloud service, offered by Google, based on Jupyter Notebooks and intended for training and research in machine learning. This platform allows you to train Machine Learning models directly in the cloud. This means that you do not need to install anything on your computer except a browser. It allows you to write and execute Python code in your web browser. Note that for a better experience, it is preferable to run the Chrome browser for working with Colab.

What is a Jupyter Notebook?

Jupyter Notebook is an Open Source web application for creating and sharing documents containing code (executable directly in the document), equations, images and text. With this application it is possible to do data processing, statistical modelling, data visualization, Machine Learning, etc..

How to access it?

You need to use a Google account. If you don’t have one already, please register and create one. You will have access to a Google drive with a 15 Gb storage space and to Google Colab. For this purpose go to: https://accounts.google.com/

Once done, have a look at the following page: https://colab.research.google.com/

Read the introduction to get an idea of what Colab is all about. You can watch the video proposed in this page (Colab presentation)

You are almost ready for the practice session.

The last step is to import a Python notebook (a ".ipynb" file) from GitHub into Colab and save it into your own Google Drive. For this purpose, click on the following link:

SOS2021_Welcome_To_Colaboratory.ipynb

Read the instructions contained in this notebook. Once done you are ready for the practice sessions with Google Colab. Congratulations! You can for sure continue to practice around with Colab to get familiar with it and explore its abilities.

We can't wait to start reviewing some statistics and have fun together!

 

Anaconda 

We recommend that participants join with their laptop already properly configured, so that no time is lost in the session:

  • with a Terminal emulator 
  • with anaconda installation (see below)

Anaconda installation

We recommend to install anaconda https://www.anaconda.com/download which includes the most common Machine Learning software suite (like sci-kit learn, matplotlib). Linux, Mac and Windows are supported. Either Graphical or Command Line installer works. If you have an old Anaconda installation you've not used since a long time, better install the new one (in particular, only python 3 is now supported).

To test it:

  • open the notebook

Two techniques to do this :

  • easiest:

    • start the application Anaconda-Navigator,

    • select Jupyter Notebook,

    • navigate to sos2022

    • click on SOS2021_Welcome_To_Colaboratory.ipynb

  • recommended :

    • open a terminal

    • cd to sos2022

    • start the notebook by typing : jupyter notebook

    • if jupyter is not known, make sure anaconda installation is in your PATH with something like : export PATH="/Users/rousseau/anaconda/bin:$PATH"

    • click on SOS2021_Welcome_To_Colaboratory.ipynb in the tab that opened in you browser

Execute the notebook. For the very basics of Jupyter notebook interactivity, please check this short video

  • Recommended method
    • click on first cell (the title!)

    • execute each cell by typing Shift-return (Mac) or Ctrl-return (PC) repetitively. For non trivial cells with code, you'll see it takes a bit more time to recompute the output

    • change the content of the first cell (with seconds_in_a_day), and reexecute it

    • for the third cell with code (starting with import numpy),

      • you'll notice you don't see the figure.

      • add at the beginning : %matplotlib inline  

      • re-run you should see the figure