hermano / python-intro

A collection of introductory exercises and materials for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction to Python for the Macke lab

This repository collects some materials for visitors and new members of the lab to get up to speed on basic Python, with a particular focus on the type of machine learning applications we use here.

What you will find here

A series of Jupyter notebooks introducing Python and machine learning

  • Python 101: Super basic introduction to Python.
  • Data Analysis 101: An introduction to Numpy, Scipy and Matplotlib. If you have some basic programming experience, especially in Python, you should probably start here.
  • Python 102: Some slightly more advanced techniques that crop up in virtually every real application. (In progress.)
  • Regression - Orientation tuning: An introduction to least-squares fitting, using orientation tuning as an example.
  • Machine Learning 101: [ TODO ] (Might be combined with Neural networks 101.)
  • Neural Networks 101: A practical introduction to neural networks for classification. In this tutorial you build a 3-layer neural network, and experiment with different sizes for the hidden layer.

What you will need

Before getting started, you should install the following:

  • Numpy
  • Matplotlib
  • Jupyter

Instructions for Linux

Installing with pip.

If this works, it's preferable.

pip install --user numpy
pip install --user scipy
pip install --user matplotlib
pip install --user jupyter
pip install --user scikit-learn

Installing from the package manager.

If you are on Ubuntu,

apt-get install python3-scipy
apt-get install python3-matplotlib  #(is this included in scipy?)
#apt-get install (Jupyter?)
pip install --user scikit-learn

Installing using Anaconda

It's also possible to install the Anaconda distributing, which includes everything you need (Python + all the packages mentioned above). The package versions in Anaconda tend to lag a little behind since they do their own packaging, but as long as you don't need the absolute newest versions, this is perfectly fine. Follow the instructions from here: https://docs.continuum.io/anaconda/install-linux.html.

Instructions for OS X

For the most pain-free installation, go with the Anaconda distribution. The installation instructions are here: https://docs.continuum.io/anaconda/install-macos.html.

You can also install through Homebrew, if you need the most recent versions.

Instructions for Windows

Compiling your own software is notoriously non-trivial on Windows, so unless you have a good reason not to, go with the Anaconda. Instructions are found here: https://docs.continuum.io/anaconda/install-windows.html.

After installing Anaconda

After installing Anaconda, you may want to install scikit-learn package to run some of the examples in the Data Analysis 101.

conda install scikit-learn

Acknowledgements

This set of materials was put together by relying heavily on similar works by

External references

Based on a list compiled by Rick Muller

Learning Resources

Badass IPython Notebooks

Packages for Scientists

Important libraries

  • Python version 3.x (whatever 'x' currently is);
  • Numpy, the core numerical extensions for linear algebra and multidimensional arrays;
  • Scipy, additional libraries for scientific programming;
  • Matplotlib, excellent plotting and graphing libraries;
  • IPython, with the additional libraries required for the notebook interface.
  • Sympy, symbolic math in Python
  • Pandas library for big data in Python

Other packages of interest [ TODO Add ML packages here ] * * *

Cool Stuff

  • Project Euler, programming problems that would (?) have interested Euler. Python is one of the most commonly used languages there.

About

A collection of introductory exercises and materials for Python


Languages

Language:Jupyter Notebook 100.0%