Neural Networks based Handwritten Digit Recognition

Similar documents
Python Machine Learning

A Neural Network GUI Tested on Text-To-Phoneme Mapping

QuickStroke: An Incremental On-line Chinese Handwriting Recognition System

Lecture 1: Machine Learning Basics

Knowledge Transfer in Deep Convolutional Neural Nets

System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Artificial Neural Networks written examination

CS Machine Learning

(Sub)Gradient Descent

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Learning Methods for Fuzzy Systems

arxiv: v1 [cs.lg] 15 Jun 2015

Autoregressive product of multi-frame predictions can improve the accuracy of hybrid models

Axiom 2013 Team Description Paper

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

Evolutive Neural Net Fuzzy Filtering: Basic Description

Software Maintenance

INPE São José dos Campos

Modeling function word errors in DNN-HMM based LVCSR systems

Human Emotion Recognition From Speech

HIERARCHICAL DEEP LEARNING ARCHITECTURE FOR 10K OBJECTS CLASSIFICATION

Softprop: Softmax Neural Network Backpropagation Learning

Calibration of Confidence Measures in Speech Recognition

Word Segmentation of Off-line Handwritten Documents

Test Effort Estimation Using Neural Network

Unsupervised Learning of Word Semantic Embedding using the Deep Structured Semantic Model

Modeling function word errors in DNN-HMM based LVCSR systems

CSL465/603 - Machine Learning

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Learning From the Past with Experiment Databases

A Reinforcement Learning Variant for Control Scheduling

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

GACE Computer Science Assessment Test at a Glance

Knowledge-Based - Systems

On Human Computer Interaction, HCI. Dr. Saif al Zahir Electrical and Computer Engineering Department UBC

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

SARDNET: A Self-Organizing Feature Map for Sequences

Deep Neural Network Language Models

An empirical study of learning speed in backpropagation

Artificial Neural Networks

Dropout improves Recurrent Neural Networks for Handwriting Recognition

arxiv: v1 [cs.cv] 10 May 2017

Predicting Student Attrition in MOOCs using Sentiment Analysis and Neural Networks

Rule Learning With Negation: Issues Regarding Effectiveness

Lecture 1: Basic Concepts of Machine Learning

Switchboard Language Model Improvement with Conversational Data from Gigaword

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY DOWNLOAD EBOOK : ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY PDF

A Review: Speech Recognition with Deep Learning Methods

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures

Circuit Simulators: A Revolutionary E-Learning Platform

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Speaker Identification by Comparison of Smart Methods. Abstract

WHEN THERE IS A mismatch between the acoustic

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

Model Ensemble for Click Prediction in Bing Search Ads

Attributed Social Network Embedding

On-the-Fly Customization of Automated Essay Scoring

FUZZY EXPERT. Dr. Kasim M. Al-Aubidy. Philadelphia University. Computer Eng. Dept February 2002 University of Damascus-Syria

The Method of Immersion the Problem of Comparing Technical Objects in an Expert Shell in the Class of Artificial Intelligence Algorithms

THE enormous growth of unstructured data, including

have to be modeled) or isolated words. Output of the system is a grapheme-tophoneme conversion system which takes as its input the spelling of words,

Rule discovery in Web-based educational systems using Grammar-Based Genetic Programming

Generative models and adversarial training

Evolution of Symbolisation in Chimpanzees and Neural Nets

Experiments with SMS Translation and Stochastic Gradient Descent in Spanish Text Author Profiling

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

LEGO MINDSTORMS Education EV3 Coding Activities

ISFA2008U_120 A SCHEDULING REINFORCEMENT LEARNING ALGORITHM

Classification Using ANN: A Review

Analysis of Hybrid Soft and Hard Computing Techniques for Forex Monitoring Systems

TRANSFER LEARNING OF WEAKLY LABELLED AUDIO. Aleksandr Diment, Tuomas Virtanen

Radius STEM Readiness TM

ENME 605 Advanced Control Systems, Fall 2015 Department of Mechanical Engineering

Neuro-Symbolic Approaches for Knowledge Representation in Expert Systems

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

A Pipelined Approach for Iterative Software Process Model

Lecture 10: Reinforcement Learning

Seminar - Organic Computing

A Case Study: News Classification Based on Term Frequency

AUTOMATIC DETECTION OF PROLONGED FRICATIVE PHONEMES WITH THE HIDDEN MARKOV MODELS APPROACH 1. INTRODUCTION

MASTER OF SCIENCE (M.S.) MAJOR IN COMPUTER SCIENCE

Device Independence and Extensibility in Gesture Recognition

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

TIMSS ADVANCED 2015 USER GUIDE FOR THE INTERNATIONAL DATABASE. Pierre Foy

Speech Emotion Recognition Using Support Vector Machine

Computerized Adaptive Psychological Testing A Personalisation Perspective

The number of involuntary part-time workers,

*** * * * COUNCIL * * CONSEIL OFEUROPE * * * DE L'EUROPE. Proceedings of the 9th Symposium on Legal Data Processing in Europe

Speech Recognition at ICSI: Broadcast News and beyond

Training a Neural Network to Answer 8th Grade Science Questions Steven Hewitt, An Ju, Katherine Stasaski

ScienceDirect. A Framework for Clustering Cardiac Patient s Records Using Unsupervised Learning Techniques

An Introduction to Simio for Beginners

Reducing Features to Improve Bug Prediction

School of Innovative Technologies and Engineering

A Simple VQA Model with a Few Tricks and Image Features from Bottom-up Attention

Notes on The Sciences of the Artificial Adapted from a shorter document written for course (Deciding What to Design) 1

Mathematics subject curriculum

Transcription:

Neural Networks based Handwritten Digit Recognition Mr.Yogesh Sharma1, Mr.Jaskirat Singh Bindra2, Mr.Kushagr Aggarwal3, Mr.Mayur Garg4 1 2,3,4 Assistant Professor,Maharaja Agrasen Institute of Technology, New Delhi Department of Computer Science and Engineering, Maharaja Agrasen Institute of Technology, New Delhi ABSTRACT- In the field of Artificial Intelligence, scientists have made many enhancements that helped a lot in the development of millions of smart devices. On the other hand, scientists brought a revolutionary change in the field of image processing and one of the biggest challenges in it is to identify data in both printed as well as hand-written formats. One of the most widely used techniques for the validity of these types of document is NEURAL NETWORKS. Neural networks currently provide the best solutions to many problems in image recognition, speech recognition, and natural language processing. Handwritten Digit Recognition is an extensively employed method to transform the data of handwritten form into digital format. This data can be used anywhere, in any field, like database, data analysis, etc. There are multitude of techniques introduced now that can be used to recognize handwriting of any form. In the suggested system, we will handle the issue of machine reading numerical digits using the technique of NEURAL NETWORKS. We aim to learn the basic functioning of the neural network and expect to find the correlation between all the parameters i.e. No of layers, Layer Size, Learning Rate, Size of the Training sets and the associated accuracy achieved by the neural net in identifying the handwritten digits, by comparing the accuracy achieved on different sets of the four variable parameters varying in the suitable range. I. INTRODUCTION In the field of Artificial Intelligence, scientists have made many enhancements that helped a lot in the development of millions of smart devices. On the other hand, scientists brought a revolutionary change in the field of image processing and one of the biggest challenges in it is to identify documents in both printed as well as hand-written formats. One of the most widely used techniques for the validity of these types of document is NEURAL NETWORKS. Neural networks currently provide the best solutions to many problems in image recognition, speech recognition, and natural language processing. Handwritten Digit Recognition is an extensively employed method to transform the data of handwritten form into digital format. This data can be used anywhere, in any field, like database, data analysis, etc. There are millions of techniques introduced now that can be used to recognize handwriting of any form. In the suggested system, we will handle the issue of machine reading numerical digits using the technique of NEURAL NETWORKS. We aim to learn the basic functioning of the neural network and expect to find the correlation between all the parameters i.e.no of layers, Layer Size, Learning Rate and the associated accuracy achieved by the neural net in identifying the handwritten digits, by comparing the accuracy achieved on different sets of the three variable parameters varying in the suitable range. We also plan to find the relation between the size of the training set used to train the neural network and find the accuracy it achieves in recognising the handwritten digits accordingly. We have used a convolutional neural network in this case which are already recognised for showing outstanding result for its use in image and speech recognition.then number of hidden layers used are varied from one to three with size of each hidden layer varying from 10-50. The accuracy of the neural net in recognising the handwritten digits is also observed at different learning rates ranging DOI : 10.23883/IJRTER.2018.4428.ON4RW 93

from 0.1-2.0. Independent observations for the accuracy achieved are also observed for the neural net being trained on datasets of size 5000 to 50000 image sets. Objectives The objective is to make a system that can classify a given input correctly. Correctly train a neural network to recognize handwritten h digits. Analyze the accuracy and of the neural network with respect to the size of Training Sets and and number of Hidden Layers. Analyze the accuracy and of the neural network with respect to the size of Hidden Layers Analyze the accuracy and of the neural network with respect to the learning rate. II. METHODOLOGIES What is a neural net? An Artificial Neural Network (ANN) is an information processing paradigm that is inspired by the way biological nervous systems, such as the brain, process information. The key element of this paradigm is the structure of the information processing system. It is composed of a large number of highly interconnected processing elements (neurons). ANNs, like people, learn by example. An ANN is configured for a specific ecific application, such as pattern recognition or data classification, through a learning process. Learning in biological systems involves adjustments to the synaptic connections that exist between the neurons. This is true of ANNs as well. Simply a Neurall Network can be defined as a mathematical function that maps a given input to a desired output. Neural Networks consist of the following components An input layer, x An arbitrary amount of hidden layers An output layer, y A set of weights and biases between betwe each layer, W and b A choice of activation function for each hidden layer, σ. The diagram below shows the architecture of a 22-layer layer Neural Network (the input layer is typically excluded when counting the number of layers in a Neural Network) Technologies Used Python 3.6 - Python is an interpreted high-level high level programming language for general-purpose general programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace. It provides constructs that enable clear programming on both small and large scales.

Python is a multi-paradigm programming language. Object-oriented programming and structured programming are fully supported, and many of its features support functional programming and aspect-oriented programming (including by metaprogramming and metaobjects (magic methods)).many other paradigms are supported via extensions, including design by contract and logic programming. Python uses dynamic typing, and a combination of reference counting and a cycle-detecting garbage collector for memory management. It also features dynamic name resolution (late binding), which binds method and variable names during program execution. Python's design offers some support for functional programming in the Lisp tradition. It has filter(), map(), and reduce() functions; list comprehensions, dictionaries, and sets; and generator expressions. The standard library has two modules (itertools and functools) that implement functional tools borrowed from Haskell and Standard ML. NumPy 1.15 - NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python. It contains various features including these important ones: A powerful N-dimensional array object Sophisticated (broadcasting) functions Tools for integrating C/C++ and Fortran code Useful linear algebra, Fourier transform, and random number capabilities Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined using Numpy which allows NumPy to seamlessly and speedily integrate with a wide variety of databases. IDLE - IDLE (short for integrated development and learning environment) is an integrated development environment for Python, which has been bundled with the default implementation of the language since 1.5.2b1. It is packaged as an optional part of the Python packaging with many Linux distributions. It is completely written in Python. IDLE is intended to be a simple IDE and suitable for beginners, especially in an educational environment. To that end, it is cross-platform, and avoids feature clutter. According to the included README, its main features are: Multi-window text editor with syntax highlighting, autocompletion, smart indent and other. Python shell with syntax highlighting. Integrated debugger with stepping, persistent breakpoints, and call stack visibility. MNIST Dataset - The MNIST database (Modified National Institute of Standards and Technology database) is a large database of handwritten digits that is commonly used for training various image processing systems. The database is also widely used for training and testing in the field of machine learning. It was created by "re-mixing" the samples from NIST's original datasets. The creators felt that since NIST's training dataset was taken from American Census Bureau employees, while the testing dataset was taken from American high school students, it was not well-suited for machine learning experiments. Furthermore, the black and white images from NIST were normalized to fit into a 28x28 pixel bounding box and anti-aliased, which introduced grayscale levels. The MNIST database contains 60,000 training images and 10,000 testing images. Half of the training @IJRTER-2018, All Rights Reserved 95

set and half of the test set were taken from NIST's training dataset, while the other half of the training set and the other half of the test set were taken from NIST's testing dataset. Matplotlib - Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxpython, Qt, or GTK+. There is also a procedural "pylab" interface based on a state machine (like OpenGL), designed to closely resemble that of MATLAB, though its use is discouraged. SciPy makes use of matplotlib. Matplotlib was originally written by John D. Hunter, has an active development community, and is distributed under a BSD-style license. As of 23 June 2017, matplotlib 2.0.x supports Python versions 2.7 through 3.6. Matplotlib 1.2 is the first version of matplotlib to support Python 3.x. Matplotlib 1.4 is the last version of matplotlib to support Python 2.6. Matplotlib has pledged to not support Python 2 past 2020 by signing the Python 3 Statement. Variable Parameters Used 1.Number of hidden layers A single hidden layer neural networks is capable of [universal approximation].the universal approximation theorem states that a feed-forward network, with a single hidden layer, containing a finite number of neurons, can approximate continuous functions with mild assumptions on the activation function. The first version of this theorem was proposed by Cybenko (1989) for sigmoid activation functions. Hornik (1991) expanded upon this by showing that it is not the specific choice of the activation function, but rather the multilayer feedforward architecture itself which allows neural networks the potential of being universal approximators. Due to this theorem you will see considerable literature that suggests the use of a single hidden layer. This all changed with Hinton, Osindero, & Teh (2006). If a single hidden layer can learn any problem, why did Hinton et. al. invest so heavily in deep learning? Why do we need deep learning at all? While the universal approximation theorem states/proves that a single layer neural network can learn anything, it does not specify how easy it will be for that neural network to actually learn something. Every since the multilayer perceptron, we ve had the ability to create deep neural networks. Traditionally, neural networks only had three types of layers: hidden, input and output. These are all really the same type of layer if you just consider that input layers are fed from external data (not a previous layer) and output feed data to an external destination (not the next layer). These three layers are now commonly referred to as dense layers. This is because every neuron in this layer is fully connected to the next layer. In the case of the output layer the neurons are just holders, there are no forward connections. Modern neural networks have many additional layer types to deal with. In addition to the classic dense layers, we now also have dropout, convolutional, pooling, and recurrent layers. Dense layers are often intermixed with these other layer types. Problems that require more than two hidden layers were rare prior to deep learning. Two or fewer layers will often suffice with simple data sets. However, with complex datasets involving time-series or computer vision, additional layers can be helpful. @IJRTER-2018, All Rights Reserved 96

The following table summarizes the capabilities of several common layer architectures. Table: Determining the Number of Hidden Layers Num Hidden Layers Result none Only capable of representing linear separable functions or decisions. 1 Can approximate any function that contains a continuous mapping from one finite space to another. 2 Can represent an arbitrary decision boundary to arbitrary accuracy with rational activation functions and can approximate any smooth mapping to any accuracy. >2 Additional layers can learn complex representations (sort of automatic feature engineering) for layer layers. Here we have observed the functioning of the neural nets for three cases With a single hidden layer With two hidden layers With three hidden layers 2. Size of hidden layers Deciding the number of neurons in the hidden layers is a very important part of deciding your overall neural network architecture. Though these layers do not directly interact with the external environment, they have a tremendous influence on the final output. Both the number of hidden layers and the number of neurons in each of these hidden layers must be carefully considered. Using too few neurons in the hidden layers will result in something called underfitting. Underfitting occurs when there are too few neurons in the hidden layers to adequately detect the signals in a complicated data set. Using too many neurons in the hidden layers can result in several problems. First, too many neurons in the hidden layers may result in overfitting. Overfitting occurs when the neural network has so much information processing capacity that the limited amount of information contained in the training set is not enough to train all of the neurons in the hidden layers. A second problem can occur even when the training data is sufficient. An inordinately large number of neurons in the hidden layers can increase the time it takes to train the network. The amount of training time can increase to @IJRTER-2018, All Rights Reserved 97

the point that it is impossible to adequately train the neural network. Obviously, some compromise must be reached between too many and too few neurons in the hidden layers. There are many rule-of-thumb methods for determining an acceptable number of neurons to use in the hidden layers, such as the following: The number of hidden neurons should be between the size of the input layer and the size of the output layer. The number of hidden neurons should be 2/3 the size of the input layer, plus the size of the output layer. The number of hidden neurons should be less than twice the size of the input layer. Here the size of the hidden layers has been varied from 10 neurons to 50 neurons for each layer. 3. Learning rate The learning rate is one of the most important hyper-parameters to tune for training deep neural networks. Deep learning models are typically trained by a stochastic gradient descent optimizer. There are many variations of stochastic gradient descent: Adam, RMSProp, Adagrad, etc. All of them let you set the learning rate. This parameter tells the optimizer how far to move the weights in the direction opposite of the gradient for a mini-batch. If the learning rate is low, then training is more reliable, but optimization will take a lot of time because steps towards the minimum of the loss function are tiny.if the learning rate is high, then training may not converge or even diverge. Weight changes can be so big that the optimizer overshoots the minimum and makes the loss worse. There are multiple ways to select a good starting point for the learning rate. A naive approach is to try a few different values and see which one gives you the best loss without sacrificing speed of training. The trick is to train a network starting from a low learning rate and increase the learning rate exponentially for every batch. Selecting a starting value for the learning rate is just one part of the problem. Another thing to optimize is the learning schedule: how to change the learning rate during training. The conventional wisdom is that the learning rate should decrease over time, and there are multiple ways to set this up: step-wise learning rate annealing when the loss stops improving, exponential learning rate decay, cosine annealing, etc. For this project we have varied the learning rate from 0.1 to 2.0. 4. Training Dataset In this particular project size of the training data set has been varied in the range 5000-50000. 5. Weights In an artificial neuron, a collection of weighted inputs is the vehicle through which the neuron engages in an activation function and produces a decision (either firing or not firing). Typical artificial neural networks have various layers including an input layer, hidden layers and an output layer. At each layer, the individual neuron is taking in these inputs and weighting them accordingly. This simulates the biological activity of individual neurons, sending signals with a given synaptic weight from the axon of a neuron to the dendrites of another neuron. @IJRTER-2018, All Rights Reserved 98

We can utilize specific mathematical equations and visual modeling functions to show how synaptic weights are used in an artificial neural network. In a system called backpropagation, input weights can be altered according to the output functions as the system learns how to correctly apply them. All of this is foundationall to how neural networks function in sophisticated machine learning projects. We have assigned the weights using following techniques techniques Using standard distribution to randomly assign values to weights. Using the value 0 initially assignment. III. EXPERIMENTAL RESULTS Comparison of accuracy 1. Single Hidden layer Specifications The results have been averaged for 7 datasets to remove the effect of random initialisation of weights. The learning rate was varied from 0.1 to 2.0 in increments of 0.1 Only 1 hidden layer was used. The size of hidden layer was varied from 10 to 50 in increments of 5. 1260 ANN were trained and tested in the process Results - Figure 1- Accuracy vs Learning Rate for one hidden layer Figure 2 - Accuracy vs Size of one Hidden Layer Observations made Maximum average accuracy (over 7 datasets) = 94.59 was achieved with Learning Rate = 0.3 and Size of Hidden Layer = 50. Keeping all other parameters similar, Maximum average accuracy = 93.08 was achieved with Learning Rate = 0.2.

Keeping all other parameters similar, Maximum average accuracy = 92.49 was achieved with Size of Hidden Layer = 50. It was observed that accuracy peaked for the ANN for Learning rate in the range 0.2 to 0.3 and followed a gradual (almost linear i.e. constant constant slope) descent as the Learning rate increased further. It was observed that accuracy peaked for the ANN for Size of Hidden Layer = 50 and that accuracy rose with the increase in the size of the Hidden Layer but the ascent was not linear and seemed to slow down (decreasing slope) as the size of Hidden Layer kept increasing further. Single Hidden layer with initial weight zero 2.Single Specifications The learning rate was varied from 0.1 to 2.0 in increments of 0.1 Only 1 hidden layer was used. The size of hidden layers was varied from 10 to 50 in increments of 5. 180 ANN were trained and tested in the process. Results - Figure 3 - Accuracy vs Learning Rate when initial weights are zero Figure 4 - Accuracy vs Size of Hidden layer when initial weights weights are zero Observations made Maximum accuracy =36.41 was achieved with Learning Rate = 0.5 and Size of Hidden Layer = 10. Keeping all other parameters similar, Maximum average accuracy = 33.95 was achieved with Learning Rate = 0.4. Keeping all other parameters similar, Maximum average accuracy = 31.23 was achieved with Size of Hidden Layer = 35. It was observed that accuracy peaked for the ANN for Learning rate in the range 0.2 to 0.3 (similar to the results where weights in ANN were initialised using standard distribution) and followed a descent as the Learning rate increased further but no clearly visible trend was observed.

It was observed that accuracy peaked for the ANN for Size of Hidden Layer = 35 but no clearly visible trend was observed relating relating the size of Hidden Layer and accuracy of the ANNs. It was observed that retraining and retesting an ANN with the same specifications had no effect on accuracy since no random factor was involved. 3. Two Hidden layers Specifications The results have been averaged for 3 datasets to remove the effect of random initialisation of weights. The learning rate was varied from 0.1 to 2.0 in increments of 0.1 2 Hidden Layers were used The size of each hidden layer was varied from 10 to 50 in increments of 5. 4860 60 ANN were trained and tested in the process Results - Figure 5 - Accuracy vs Learning Rate for two hidden layers Figure 6 - Accuracy vs Size of Individual Hidden Layers for two hidden layers

Figure 7- Accuracy vs Size of two Hidden Layers Figure 8 - Difference in accuracy when order of the size of hidden layer is reversed Observations made Maximum average accuracy (over 3 datasets) = 94.26 was achieved with Learning Rate = 0.3 and Size of Hidden Layer = (50, 30) in that order. Keeping all other parameters similar, Maximum average accuracy = 92.71 was achieved with Learning Rate = 0.2. Keeping all other parameters similar, Maximum average accuracy = 91.37 was achieved with Size of Hidden Layer = (50, 45) in that order. It was observed that accuracy peaked for the ANN for Learning rate in the range 0.2 to 0.3 and followed a gradual (almost linear i.e. constant slope) descent as the Learning rate increased further. The descent was almost identical to the one observed in ANNs with only one hidden layer. It was observed that accuracy peaked for the ANN for Size of each Hidden Layer = 50 and that accuracy rose with the increase in the size of the each Hidden Layer. @IJRTER-2018, All Rights Reserved 102

The ascent of accuracy with respect to increase in size of each Hidden Layer was not linear and seemed to slow down (decreasing slope) as the size of each Hidden Layer kept increasing further. Moreover, accuracy rose much quicker qui (slope decreased slowly) with th increase in size of the first Hidden Layer than with the increase in sze of the t second Hidden Layer. The difference in accuracy in when order of the size of hidden layer is reversed was more pronounced when the difference between the size of each layer was higher and vice versa. The general rule observed was that order of the size of the hidden layer (in case of unequal hidden layers) must be so chosen as to maximise the number of weights in the ANN. 4. Three Hidden layers Specifications The results have been averaged for 3 datasets to remove the effect of random initialisation of weights. The learning rate was varied from 0.1 to 1.0 in increments of 0.1 3 Hidden Layers were used The size of each hidden layer was varied from 30 to 50 in increments of 5. 3750 ANN were trained and tested in the process Results - Figure 9 - Accuracy Accu vs Learning Rate for three hidden layers Figure 10 - Accuracy vs Size of Individual Hidden Layers for three hidden layers

Figure 11 - Accuracy vs Size of three Hidden Layers Observations made Maximum average accuracy (over 3 datasets) = 93.19 was achieved with Learning Rate = 0.3 and Size of Hidden Layer = (40, 50, 40) in that order. Keeping all other parameters similar, Maximum average accuracy = 92.27 was achieved with Learning Rate = 0.3. Keeping all other parameters similar, Maximum average accuracy = 91.67 was achieved with Size of Hidden Layer = (50, 45, 50) in that order. It was observed that accuracy peaked for the ANN for Learning rate in the range 0.2 to 0.3 and followed a gradual (almost linear i.e. constant slope) descent as the Learning rate increased further. The descent was almost identical to the one observed in ANNs with one and two hidden layer. It was observed that accuracy peaked for the ANN for Size of each Hidden Layer = 50 and that accuracy rose with the increase in the size of the each Hidden Layer. The ascent of accuracy with respect to increase in size of each Hidden Layer was not linear and seemed to slow down (decreasing slope) as the size of each Hidden Layer kept increasing further. Moreover, accuracy rose much quicker (slope decreased slowly) with increase in size of the first Hidden Layer whereas accuracy showed only a nominal rise with increase in size of second and third hidden layer. 5. Single Hidden Layer with varying training sets Specifications The size of training set was varied from 5,000 to 50,000 in increments of 5,000. Only 1 hidden layer was used. 1100 ANN were trained and tested in the process and the results were averaged across various learning rates and sizes of the hidden layer. @IJRTER-2018, All Rights Reserved 104

Figure 12 - Accuracy vs Size of Training Sets Observations made Keeping all other parameters similar, Maximum average accuracy = 93.98 was achieved using the training set of size = 50,000. It was observed that accuracy peaked for the ANN when it was trained using the training set of size = 50,000 and that accuracy rose with the increase in the size of the training set but the ascent was not linear and seemed to slow down (decreasing slope) as as the size of the training set kept increasing further. IV. CONCLUSION Summary - The artificial neural network to classify handwritten digits was successfully created and by tuning the various parameters (no. of hidden layers, size of hidden layers, learning rate and size of the training set used), accuracy of upto 95% was achieved. It was observed that accuracy peaked for the ANN for Learning rate in the range 0.2 to 0.3, Size of Hidden Layer = 50 and Size of Training set = 50,000 in the range tested. Accuracy fell almost linearly with the learning rate when the learning rate was moved out of its optimal range. Accuracy of the ANN increased with increase in size of the hidden layers and the size of the training set used but ascent was not linear and had a decreasing slope as they kept increasing further. On increasing the number of hidden hidden layers, higher accuracy was observed even if the the size of hidden layer and the learning rate was not in the optimal range. Future scope Handwritten digit recognition can be used in numerous fields to convert data in handwritten format to digital format ormat which can then be easily stored, transferred, processed and analysed for further usage. The effects of various parameters on accuracy of the ANN can be used to efficiently train any ANN to gain the most accurate output. The various parameters can be tuned in accordance to the quality of the results desired. REFERENCES [1] Xiao-Xiao Xiao Niu and Ching Y. Suen, A novel hybrid CNN SVM CNN SVM classifier for recognizing handwritten digits, ELSEVIER, The Journal of the Pattern Recognition Society, Vol. 45, 2012, 1318 1318 1325. [2] Diego J. Romero, Leticia M. Seijas, Ana M. Ruedin, Directional Continuous Wavelet Transform Applied to Handwritten Numerals Recognition Using Neural Networks, JCS&T, Vol. 7 No. 1, 2007. [3] Al-Omari F., Al-Jarrah Jarrah O, Handwritten Indian numerals recognition system using probabilistic neural networks, Adv. Eng. Inform, 2004, 9 16. 16.

[4] Asadi, M.S., Fatehi, A., Hosseini, M. and Sedigh, A.K., Optimal number of neurons for a two layer neural network model of a process, Proceedings of SICE Annual Conference (SICE), IEEE, 2011, 2216 2221. [5] N. Murata, S. Yoshizawa, and S. Amari, Learning curves, model selection and complexity of neural networks, in Advances in Neural Information Processing Systems 5, S. Jose Hanson, J. D. Cowan, and C. Lee Giles, ed. San Mateo, CA: Morgan Kaufmann, 1993, pp. 607-614 [6] Saeed Al-Mansoori, Intelligent Handwritten Digit Recognition using Artificial Neural Network, Int. Journal of Engineering Research and Applications, Vol. 5, Issue 5, ( Part -3) May 2015, pp.46-51 [7] Sonali B. Maind, Priyanka Wankar, Research Paper on Basic of Artificial Neural Network, International Journal on Recent and Innovation Trends in Computing and Communication, Volume: 2 Issue: 1 96 100 [8] J. Cao, M. Ahmadi and M. Shridar, A Hierarchical Neural Network Architecture For Handwritten Numeral Recognition, Pattern Recognition, vol. 30, (1997) [9] S. Haykin, Neural Networks: A Comprehensive Foundation, Second Edition, Pearson Education Asia, (2001), pp. 208-209 [10] B. B. Chaudhuri and U. Bhattacharya, Efficient training and improved performance of multilayer perceptron in pattern classification, Neurocomputing, vol. 34, no. 1 4, (2000), pp. 11 27 [11] Y. Le Cun, B. Boser, J. Denker, D. Henderson, R. Howard, W. Hubbard and L. Jackel, Handwritten digit recognition with a back-propagation network, Advances in neural information processing systems, San Mateo, Morgan Kaufmann, (1990), pp. 396-404. [12] Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, "Gradient-Based Learning Applied to Document Recognition", Intelligent Signal Processing, (2001), pp. 306-351. [13] J. A. Snyman, Practical Mathematical Optimization: An Introduction to Basic Optimization Theory and Classical and New Gradient-Based Algorithms, Springer Publishing, (2005). @IJRTER-2018, All Rights Reserved 106