Vectorized code implementation of Logistic Regression and Artificial Neural Networks to recognize handwritten digit

Faizan Farooq, Siddhant Tandon, Pankaj Parashar, Prateek Singh Sengar · 2016

This paper presents the development of a Machine learning model through implementation of two algorithms namely Logistic Regression and Artificial Neural Networks to recognize handwritten digits from 0 to 9. The Training efficiency of both the algorithms is compared at the end of implementation. Logistic Regression is generally used for binary classification however; multiclass classification has been achieved by using One-vs-All approach. Artificial neural networks are used for feed forward propagation to build the hypothesis function and back propagation is used for calculation of weights. The weights for both the models are minimized using advanced optimization algorithm such as fmiunc and fmincg. The formulas are implemented in vectorized format that is the formulas are solely expressed in matrix form and nowhere for loops are required. Vectorization does involve a lot of formulations to be done on paper beforehand but it ultimately serves the optimization purpose because higher programming languages such as MATLAB are very efficient to implement vectorized codes and this property should be exploited. The database consists of five thousand handwritten digits. The final result shows the program predicting the number on the display. The system is well trained and effective in recognizing the number.

Read the paper · More papers on PaperTik