Python implementation of various machine learning algorithms
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
ANN Change test set data for xor Nov 18, 2016
CNN Add real time (1D) classification Dec 12, 2016
Linear Regression Update eeg lasagne model Nov 15, 2016
Logistic Regression Change test set data for xor Nov 18, 2016
data Add basic lasagne implementations Nov 12, 2016
utils Extract frequency bands Dec 10, 2016
.gitignore Add xcorr data to gitignore Dec 10, 2016
LICENSE Basic convnet for MNIST Nov 3, 2016 Add eeg lasagne model Nov 12, 2016

Python Machine Learning

Code samples for a directed studies course on computational modelling (UBC PSYC 547E)

This work was done primarily for learning purposes. The following have been implemented:

  • Linear regression (using base Python)
  • Logistic Regression (AND gate)
  • Logistic Regression (OR gate)
  • ANN (XOR gate)
  • CNN (MNIST - hand written digits)
  • CNN (CIFAR10 - colour objects)
  • CNN (EEG - mind wandering classification)

Note: the code has only been tested on Windows 10 with Python 2.7.12 (64 bit)


  • Python 2.7.x
  • Install:
    • This is should already be installed on Mac OSX
  • numpy
    • Install: pip install numpy
    • Used to handle arrays and matrices in Python
  • theano
    • Install: pip install theano
    • Used for symbolic expressions and GPU training
  • matplotlib
    • Install: pip install matplotlib
    • Used for plotting
  • lasagne
    • Install: pip install --upgrade
    • This is only used for the Lasagne implementations of the different models
  • nolearn
    • Install: pip install nolearn
    • This is only used for the lasagne + nolearn implementations of the different models

The quickest/easiest way to get up and running is by installing the Anaconda Python distribution, which comes with all dependencies installed (theano, lasagne, and nolearn will still need to be installed separately).