Coder Social home page Coder Social logo

learningml's Introduction

LearningML

I have been following an UDEMY course by lazy programmer. This course had a workshop on the following projects.

  • MNIST Handrwitten digits recognition
  • Parity Problem solving using ANN and RNN

The first problem involves identifying handwritten digits. A training dataset has been provided by kaagle along with a validation set. I have implemented an ANN using only numpy along with RMSProp and velocity to train on this dataset. Following this I try to make predictions on the validation set.

The second problem tries to predict the parity of a binary number. If the number of 1's in a binary representation of a number is odd then the parity is set to 1, otherwise 0. We try to make an ANN learn this problem. Howeve,r we realize that it is difficult for an ANN to understand this problem as it would require a large number of hidden units. Hence, we try using RNN where each bit of the input number is treated as sequence and we feed back the hidden values at each step. There is a marked improvement in the output.

Data

Contains the following data file

  • train.csv : contains the mnist handrwitten digit training dataset from Kaggle
  • test.csv : contains the mnist handrwitten digit validation dataset from Kaggle

mnist

  • ANNHelper.py is the helper file containing derivatives and non linearity for a single layered neural network in numpy
  • MYANN.py takes as input handwritten digits in form of 32x32 image and trains these images on a sinle layered Neural Network with 500 hidden untis. The non linearity used is RELU function.

util

  • Utils.py contains code for loading handwritten digits from csv training and testing file along with some common code.
  • util_parity contains code for laoding all possible 2048 combiations of 12 bit binary numbers. This dataset is used for parity problem.

parity

mlp_parity.py : takes as input an exhaustive permuation of 12 bit binary number and learns the parity problem. Following this it tries to predict the parity of an input sequence. It uses Artificial Neural Network for this problem.

rnn_parity : tries to learn the same problem like above except that it uses a recurrent neural network.

Output

MNIST Handwritten difgits classification with ANN yeilded a classification rate of 0.972 Parity with ANN yielded a classification rate of 0.5 Parity with RNN yielded a classification rate of 1.0

Also later in another project MNIST Handwritten difgits classification yielded a rate of 0.99 using Convolutional Neural Network

learningml's People

Contributors

pd60193 avatar

Watchers

 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.