In our previous articles, we have talked about how to approach the problem and how to get started with the data in order to implement an AI solution. We have seen where and how to gather necessary data, how to process that data so that it's more useful.
Today we will explore the next step in the process, i.e. applying techniques to get smart predictions out of the data. Let's dive right in.
What is Machine Learning?
Machine Learning is subdiscipline of AI that focuses on teaching computers how to learn without the need to be programmed for specific task. In other words, we try to build a system that mimics human actions.
So how does this work?
Let's take a simple example. A newborn baby is like a naive machine that has a blank slate. It comes in this world with no understanding of the new world it has stepped into. Parents teach the baby about this world bit by bit. Some things are simpler to understand, like how to differentiate between a human and an animal, while some things are difficult to be taught, like how to eat with your own hands or how to walk. But eventually, with enough amount of training and teaching, a baby slowly starts to understand all these tasks and starts to build an understanding.
Similarly, a machine has no decision-making capabilities until it is trained in that manner. It starts to understand and solve simple problems with initial training, but eventually, with an increased amount of training, the system can understand more complex patterns and can make more complex decisions.
Types of training
When a 4-year-old kid is shown an image of an Apple and told that this is an Apple enough times, his/her brain starts understanding the difference between an Apple and any other fruit. This is a perfect example of Supervised learning. The kid was presented with the labeled data and his/her brain starts understanding the features that are associated with an Apple. Anything round and red, can be an Apple, is the initial understanding.
What if the kid is shown an image of a Tomato? There is a fair possibility that the kid will classify it as an Apple. And why is that? This is because the kid was never shown a Tomato before. The initial training only involved images of Apple, which shares shape and color with an Apple.
But once the kid is provided enough feature differences between the two, like a new feature set is added to the dataset such as "touch" and "taste", after enough sample sets, the kid will be able to differentiate between the two.
This brings us to the formal definition of supervised learning.
Supervised learning is useful when we have historical data and our goal is to train the system so that it can understand and learn the pattern and predict future events based on this learning.
Not all problem statements have a labeled dataset. This is where Unsupervised learning is useful. The goal here is not to predict the outcome for any future event, but to understand a pattern in data. The goal in such unsupervised learning problems may be to discover groups of similar examples within the data, where it is called Clustering, or to determine the distribution of data within the input space, known as Density estimation.
This is where things get interesting. In Reinforcement learning, the machine is directly interacting with the environment it is in. A constant feedback mechanism helps the system understand and learn better. This algorithm works on simple Rewards and Penalties system, where the system is rewarded every time it gives the right prediction and punished, every time the prediction is wrong. Along with the way, the system can make the right decisions over a period of time.
How to implement?
With all the theoretical concepts explained, let's talk about practical implementations of these algorithms. There are different programming tools available to implement the algorithms.
Scikit-learn: An open-source python library using which any machine learning techniques can be implemented.
Tensorflow: An open-source software library for machine learning. It can be used across a range of tasks but has a particular focus on training and inference of deep neural networks. It was developed by the Google Brain team.
PyTorch: An open-source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing, primarily developed by Facebook's AI Research lab.
Here is an example of how to choose between different algorithms based on the problem statement.
This was a small introduction to different algorithms and methods involved in the complete process of Machine Learning. With the basic understanding, we can move on to more advanced concepts of Machine Learning, where we can talk about Neural Networks and Deep learning concepts.
Hope this article was able to give you the overall working of the AI-enabled system. Stay tuned for more advanced tutorials and articles in the space.