GithubHelp home page GithubHelp logo

deep_lda's Introduction

Deep Linear Discriminant Analysis (DeepLDA)

This repository contains code for reproducing the experiments reported in the ICLR 2016 paper Deep Linear Discriminant Analysis by Matthias Dorfer, Rainer Kelz and Gerhard Widmer from the Department of Computational Perception at JKU Linz.

Requirements

The implementation is based on Theano and the neural networks library Lasagne. For installing Theano and Lasagne please follow the installation instruction on the respective github pages.

You will also need: matplotlib, numpy and scipy

Experiments

We report results for three different benchmark datasets in our paper. The datasets will be downloaded automatically form the corresponding data set pages.

Training

For training the models just run the following commands:

MNIST: the model should train up to a validation accuracy of around 99.7%.:

python exp_dlda.py --model mnist_dlda --data mnist --train

CIFAR10: the model should train up to 91.5% validation accuracy. This is a little bit less than the results reported in the paper as no GCN-ZCA normalization is applied:

python exp_dlda.py --model cifar10_dlda --data cifar10 --train

Train on the first fold of STL10:

python exp_dlda.py --model stl10_dlda --data stl10 --train --fold 0
  • the model should train up to a validation accuracy of around 67% on fold 0.
  • you can of course train on the remaining folds by changing the --fold argument
  • we train this model on NVIDIA Tesla K40 (12GB memory) so it might be to large for less powerful GPUs (in this case you could try to reduce the batch size).

Evaluation

For evaluating the trained models run the following commands. The script will report:

  • The accuracies on train, validation and test set
  • Report the magnitudes of the individual eigenvalues after solving the general (Deep)LDA eigenvalue problem compare Figure 5 in paper)
  • Produce some plots visualizing the structure of the latent representation produced by the model (compare Figure 5 in paper)
python exp_dlda.py --model mnist_dlda --data mnist --eval
python exp_dlda.py --model cifar10_dlda --data cifar10 --eval
python exp_dlda.py --model stl10_dlda --data stl10 --eval --fold 0

deep_lda's People

Contributors

dmatte avatar

Watchers

sorcerer's apprentice avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.