Deep Learning: The State of the art
An intuitive idea about Deep learning and how to get started with it.
“I believe that at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted.”
― Alan Turing
Its the 21st century, where we use voice assistants like Alexa, Siri, and Google assistant for our daily routine, where companies like Tesla are bringing new technologies like self-driving cars. We live in a world where, for better and for worse, we are constantly surrounded by deep learning algorithms. From Youtube video recommendation to drug discovery to medical image processing (…is that bump cancer?), the field of deep learning influences our lives and our decisions every single day. Even in the field of Robotics, Deep learning is very useful. Sophia, the first humanoid to get a country’s citizenship, is a great example of that.
To be clear, if you are thinking that deep learning is all about coding, you are wrong. Deep learning or even machine learning is more maths and less coding. Yes, Maths!. You do not need to be a maths geek or something, but a fundamental knowledge of elementary and college level maths is a must. So, if you are thinking about building your career in deep learning/machine learning/ Data science, I would recommend you to get a foundational knowledge about linear algebra, calculus, statistics, and probability. Consider this as a prerequisite.
Now let’s move on to the main topic :
What is Deep learning?
Deep learning is a subset of machine learning which is itself a subset of artificial intelligence. The basic idea is to build a model or algorithm which works similarly to the human brain. This is why the model is named as “Neural Network”.
Machine learning project pipeline
Before diving into neural networks, one should know how any machine learning or deep learning project is built. First of all, we have to gather data to feed in our network. This data can be anything. It can be details of a bank’s customers, a photo, a video, etc. Data can be classified as structured and unstructured data. Structured data is something that is well labeled and formatted, for eg: Result of a semester exam, or customers’ details of a company/product or Details about COVID-19 cases around the globe. Whereas a photo, video, audio, etc are considered as unstructured data. Deep learning is mainly used for unstructured data but it can also be used for structured data as well but it would be like killing a fly with a bazooka! Classical machine learning algorithms work fine for structured data. Once you gathered the data (though there are different techniques to gather raw data, I will write about it later.), the next step is to visualize and analyze it. If needed, data preprocessing is done to customize the data which will be suitable to fit in your model. Now its time to build the model. This is where deep learning concepts are used. Once your model is built, the data is fed to the model, and then the model’s performance is plotted. Overfitting and underfitting are two significant reasons why your model is not performing well. I will tell you about overfitting and underfitting later, for now, take it as well-known “bugs” in a machine learning model. And finally, predictions are made. And Voila! Your deep learning model is ready to use. You can deploy it to a website, a microcontroller like Arduino or raspberry pi, or any user interface. This is how a basic machine learning/ deep learning project is built.
A quick view of Neural Networks
Moving on to neural networks, a neural network is constructed by connecting the input data to a layer of, what is called, neurons. These neurons mathematically compute some parameters(tell you about it next article) which are essential for a machine to learn. Further, the layer of neurons is again connected to another layer of neurons, and so on until the last layer of neurons. The last layer of neurons is connected to the output layer, where the prediction is evaluated. The diagram below depicts how a neural network looks.
Messy, isn’t it? Well, it looks messy, but don’t worry your neural network code will never output this.
Do I have what it takes?
While reading this, many of you were wondering that if you can or cannot get on with it? Well, do you want to learn Deep learning? If yes, then you have what it takes. Will is everything you need to start something. Rest other things are less important. Once you start studying deep learning, at some point, you will find it time-consuming and eventually get off from it. You have to be consistently dedicated. It is different from web development or app development. You have to keep learning. There is no end of machine learning and AI. So, before getting started, make up your mind for it because it is a journey without a destination. You have to enjoy the journey and never think of the destination.
How do I get started with Machine learning/Deep learning
If you read the above paragraph, and you are dedicated to learn machine learning and know the mathematical concepts which I mentioned earlier, here are some tips to get started:
0. Get a good PC (not necessary but one should):
Get a PC with a good GPU. Deep learning is a high computational task and it requires high computing power. Therefore getting a PC with a good GPU is great. Even GTX-1050 Ti will be enough to start with. But it is not necessary to get a PC with GPU. If you already have a PC or you can’t buy an expensive PC with GPU you can still learn deep learning. There are a couple of free cloud GPU providers like google colab and kaggle. These are the platform which provides cloud GPUs to get started with deep learning.
- Learn a programming language:
You know the math, now to implement it you need to know the language that machine understands (of course not binary). Python is the most popular programming language among software developers and machine learning engineers. It is very easy to learn and many machine learning and deep learning frameworks and libraries support python. I would recommend you to learn python because I will be using python code in my future articles. Javascript would also be another choice as Tensorflow (a deep learning framework) now supports Javascript too. After picking a language, learn the basic concepts of programming like conditional statements, loops, functions, and object-oriented programming. There are many good youtube channels for python tutorials. Go and have a look and select one which suits you.
2. Get familiar with numpy, pandas, and matplotlib:
These are not greek words :p. Numpy, pandas, and matplotlib are some python libraries that are frequently used in machine learning projects. Numpy is used for scientific computations like matrix multiplications, dot and cross products, etc. Pandas is a data preprocessing library which is used to manipulate data. Although it is mostly used with structured data but sometimes it is also used with unstructured data. Matplotlib is a graph plotting library. It plots various graphs like bar, histogram, line chart, etc. These 3 are used in almost every machine learning project so these 3 are very essential ones. Along with these libraries, you will come across various libraries like cv2, librosa, etc. Learn them along as required. I already said once you start machine learning you have to keep on learning. You can skip this step and learn these libraries while building projects. Again, you can learn these from various youtube channels, and also you can have a look at their official documentation. Just google search “library name documentation”, you will get the link.
3. Deep learning algorithms:
If you are familiar with classical machine learning algorithms like linear regressions, SVM, decision trees, etc., its great! If not, it’s not a much loss but you should know these algorithms too. I will write about the algorithms in detail. But this article focuses on deep learning. So start learning deep learning. Do not start by learning frameworks like Tensorflow and PyTorch. You will end up memorizing the code and that’s not what anybody wants. Learn the maths behind deep learning algorithms and then implement it in pure python from scratch. I will publish article series for this real soon. You can take online courses from Coursera, edx, or udemy. The deep learning specialization by deeplearning.ai in Coursera is a great course with an in-depth understanding of the algorithms and is taught by a well-known machine learning expert Andrew Ng. He has a machine learning course in Coursera as well. You can enroll in both if you like. You can read books for learning algorithms. One of the books I would recommend is the Deep Learning book by Ian Goodfellow. It is pure maths and no code. All the algorithms are explained well in the book and basic maths required for deep learning is covered in the first few chapters of the book.
4. Now move on to frameworks:
Once you understand the algorithms, get your hands dirty by using them in deep learning frameworks. You will find using these frameworks quite easy after learning the algorithms and the maths behind it. Frameworks reduce the efforts of building a machine learning model because it has prebuilt layers and networks, you just have to input the data and set the parameters and you are good to go! Frameworks do all the dirty work like forward propagation, backward propagation for us. But before using frameworks learn the algorithms from scratch.
5. Never stop learning:
Once you get an understanding of deep learning, don’t stop. Keep exploring, read research papers, build projects, compete in hackathons, do internships, use any medium through which you can learn.
Deep Learning in the Future
The future is full of potential for anyone interested in deep learning. The most remarkable thing about a neural network is its ability to deal with vast amounts of disparate data. That becomes more and more relevant now that we’re living in an era of advanced smart sensors that can gather an unbelievable amount of data every second of every day. It’s estimated that we are currently generating 2.6 quintillion bytes of data every single day. This is an enormous amount of data. While traditional computers have trouble dealing with and drawing conclusions from so much data, deep learning becomes more efficient as the amount of data grows larger. Neural nets are capable of discovering latent structures within vast amounts of unstructured data, like raw media for example, which are the majority of data in the world.
The possibilities are endless!
What’s Next?
This is my first story on medium where I barely scratched the surface of deep learning but I will publish more stories about machine learning and deep learning. In the next story, I will give you an idea about different types of machine learning and we will try to develop a deep learning mindset by applying logistic regression. So stay tuned!