email skype

Where does Deep Learning differ from Machine Learning?

Learn deep learning, machine learning, ML

This question has been in my mind for a while now. I have read a lot about this. Still the difference is fuzzy. So I decided to research more and write about this so that it is clear in my mind and hopefully help the reader understand it as well.

Machine Learning – The good old (gosh! Is this already old now? ) Machine learning is where you give some data (labeled or not. If it is labeled, then it is supervised learning, if not then it is unsupervised learning) to a ML algorithm say SVM (Support Vector Machine) and let it learn the patterns in the data enough to do classify it (say recognize faces). The algorithm trains on your training set and then it is tested on a validation set to see if it will generalize (see if it works well on new data that it hasn’t seen before). If it is satisfactory, then it is put to use. This is very simplistic explanation but covers all the steps.

Let’s spend a few lines to discuss supervised vs unsupervised learning. Since there is a perception that unsupervised learning is Deep Learning. I have heard it from my interns here at Optisol and other places. Unsupervised learning is NOT Deep Learning. An example of unsupervised learning is using something like PCA (Principle Component Analysis) to shrink a dataset like a collection of images. What this means is a high-dimensional (way too many columns, like in the 1000s) data set can be shrinked using PCA but still keep most of the variance in the individual images. This reduced (‘eigenfaces’ ) dataset will have probably about 10% of the original columns and helps the ML algorithm learn faster compared to the original dataset .  Also this reduced dataset will have a better signal to noise ratio than the original. Hence it is common to pre-process the data thru a feature extraction algorithm like PCA before feeding it to an ML algorithm to train. I will put up a live demo of this process of using unsupervised PCA followed by supervised SVM to classify images soon. But I hope you got the picture now. Both unsupervised and supervised algorithm are being used in a Machine Learning pipeline together and this is NOT Deep Learning.

Ok. Now where does Deep Learning fit here? One place where it can fit here in this pipeline of facial recognition is in feature extraction (the first phase where we shrunk the dataset using PCA). Like PCA there are other feature selection algorithms like HOG (Historgram of Gradients) that works nicely on image data. But here we are relying on the intuition/experience of the engineer to pick the algorithm to build your ML pipeline. Deep Learning on the other hand can utilize something like a Deep Neural network (what is this? Will do another article) that has a self-learning component that can independently estimate (without the aid of the engineer) the ideal feature extraction strategy for a particular dataset. It has a built-in error detection function that will calculate the weighted error gradient from each layer in the Neural Network. This will help in the tuning of the parameters that will yield the lowest error/cost values. This self learning feature that learns from the errors it makes is what differentiates the Deep Learning from regular Machine Learning. But this learning comes at a steep computational cost and needs humongous amounts of data to learn from.

Open tools like Google’s TensorFlow (Does TensorFlow only do Deep Learning? Ans: NO. Will do another article) has made building such Deep Learning, self correcting Neural networks more accessible to us than any time in the past. So Deep Learning is increasingly being used more in scenarios like Facial Recognition and such. But it is still hasn’t hit the main stream yet. Still for majority of the problems and scenarios traditional Machine Learning algorithms do a satisfactory job. So even if Deep Learning is our goal (if it is), the path towards that will still be through regular Machine Learning.

I hope to do a live demo of a simple image recognition example using Machine Learning first and then incorporate Deep Learning in it. So keep an eye out for that. Please let me know in the comments if there are any questions or suggestions that I will cover in a future article.

Deep Learning, Machine Learning Flow