Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Latest commit

 

History

History
272 lines (202 loc) · 9.24 KB

course_summary.md

File metadata and controls

272 lines (202 loc) · 9.24 KB

Course Summary

Note that the course summary will be updated throughout the course.

Block 1

Getting started

Goals

  1. navigate in the shell application: cmd or terminal
  2. have python and anaconda installed, all required packages installed
  3. now how to open and close, Python console, IPython console, jupyter notebook

Content

Shell: learn shell commands like ls, cd, pwd, mkdir, cp, mv, rm, rm -r, touch, echo, cat Python: download and installing anaconda, open python console, close it, install packages using anaconda IPython: open console, getting help, advantage compared to python console Jupyter notebook: open it, create a notebook, write code in cells, write markdown in cells, execute and create cells, delete cells, restart the kernel, close the notebook, stop the notebook server

Resources

Exercises

Basics of python

Goals

  1. Know different ways to write and execute python code: console, script, jupyter notebook
  2. Be familiar with python variables and data types, know how to access the documentation
  3. Be familiar with booleans, dictionaries, if-else statements, loops, indexing, slicing, mutability, generators, iterators

Content

  • python data types: boolean, int float, string, list, dict, tuple
  • operators: +, -, /, *, **, %
  • methods associated with data types, e.g., essential string methods, essential list methods.
  • if-elif-else statements, conditional variable assignment, in operator
  • list and tuple indexing, dict indexing, mutability vs. immutability,
  • while loops, for loops, concept of iterator and generator, using enumerate, and zip, combining them.
  • iterating through dictionaries
  • list comprehension, conditional list comprehension

Resources

Exercises

NumPy

Goals

  1. What is a Numpy array, and why to use them? (motivation)
  2. Importing and Generating Data
  3. Getting insight about the Data (type, dimension, size, etc.)
  4. Manipulating the array (arithmetic operations, transpose, etc.)
  5. Slicing and Masking
  6. Combining arrays
  7. Saving data

Content

  • Import data:
    • np.load()
    • np.loadtxt()
    • np.genfromtxt()
  • Creating Numpy arrays
    • np.zeros()
    • np.ones()
    • np.random.random()
    • np.empty()
    • np.full()
    • np.full_like()
    • np.eye()
    • np.identity()
  • Data Inspection (assuming we have numpy a array object called data)
    • data.dtype
    • data.ndim
    • data.shape
    • data.size
    • data.strides
    • data.min()
    • data.max()
    • data.mean()
    • data.std()
    • data.cumsum()
  • Data Transformation (assuming we have a numpy array object called data)
    • data.T
    • data.reshape()
    • data.resize()
    • np.expand_dims()
    • np.ravel()
    • np.add(), np.subtract(), np.multiply(), np.divide(), np.remainder()
    • np.exp(), np.log()
    • Masking using list (or array) of True and False values
  • Combining multiple arrays ans splitting an array
    • np.concatenate()
    • np.append()
    • np.hstack()
    • np.vstack()
    • np.hsplit()
    • np.vsplit()
  • Saving numpy arrays
    • save(): saves data in .npy format
    • savez(): Save several arrays into an uncompressed .npz archive
    • savez_compressed()
    • savetxt()

Resources

Exercises

Block 2

scikit learn

Goals

  1. Learn to apply different machine learning techniques to analyze data
  2. Introduce basic principles like supervised/unsupervised learning, overfitting, hyperparameters, cross validation
  3. Understand the scikit learn syntax and pipeline

Content

  • Basic principles of machine learning:
    • Data layout
    • Choosing an algorithm
    • Evaluation
    • Cross validation
  • Supervised learning
    • Classification
    • Regression
    • Measuring performance
    • Support Vector Machines
    • Decision Trees
  • Unsupervised learning
    • Clustering (K-means)
    • Dimensionality reduction (PCA)
    • Density estimation (Gaussian Mixture Model)

Resources

Exercises

Pytorch

Goals

  1. What is pytorch and why is it useful
  2. Build an artificial neural network step by step

Content

  • Pytorch compared to numpy
  • Forward propagation
  • Backpropagation
  • Building a neural network in pytorch
  • Activation functions
  • Loss functions
  • Classification with NNs
  • Convolutional neural networks

Resources

Exercises

Block 3

Project work starts

Coding Environments

  • Differences IDEs and editors
  • Give an overview what editors and IDEs they could use
    • in particular PyCharm, Jupyter Lab and Jupyter Notebook.
    • other environments: Atom, VIM, Spyder, Python-IDLE, Emacs
  • Choosing an environment for this project and setting everything up (e.g. conda environment in PyCharm)

Conda Environments

  • What is a Conda environment
  • Some background why we need them and why they are useful
  • Setting up new environment for the project
  • Fundamental conda commands
    • conda create -n myenv
    • conde env list
    • conda activate myenv
    • conda deactivate myenv
    • conda install PKGNAME==3.4.1
    • conda list --explicit > pkgs.txt

Introducing and coosing porjects

Overview of coding languages

  • advantages and disadvantages of commonly used coding languages
  • differences between languages (purpose, compiled, ...)
    • in particular: Java, Python, C, C++, SQL, PHP

For Loops

Coding Conventions

  • Python specific coding and naming conventions for clean code
  • naming of variables, classes, functions
  • design patterns: KISS, DRY
  • reusability of code
  • documentation of code

Object Oriented Programming

Jupyter server