The Simple Analogy – Learning from Experience
Suppose you want to teach your child what a “cat” is. You would likely not tell them a set of rules defining what is and is not a cat. Instead, you might show them many examples of cats – telling them each time whether or not that example was a cat. Eventually, your child would be able to see patterns in the examples you give them and understand how to differentiate between a cat and anything else.
That is precisely what machine learning is, except with computers. It is a process that allows a computer to learn from examples and make predications or decisions on its own without being explicitly programmed.
The Formal Definition
Machine Learning is a field of study in Artificial algorithms (AI) that gives computers the ability to learn from examples and make predications or decisions on its own without being explicitly programmed. The main goal is to create computer programs that can automatically learn and improve from experience.
Therefore, machine learning algorithms attempt to find patterns in data sets by building models that can be used to make predictions or decisions about the data.
How does it work?
The basic process Although it can get complicated, the overall process is straightforward:
Data gathering: obtain as much relevant data as possible. This will serve as food for our ML algorithm. (Example: thousands of photos of cats and dogs labeled as such)
Data preparation: this often time-consuming and laborious process consists in organizing the data in a certain way and eliminating faulty data.
Algorithm selection: there are many ML algorithms out there, each with its own strengths and weaknesses. We’ll talk about some of them in the next chapter.
Training: the algorithm is now fed with the data in order to learn the system. In this step, the ML algorithm ingests the data and learns to perform the task, making guesses and then correcting itself.
Evaluation: a test set of data (the algorithm has never seen before) is used to evaluate the performance of the ML model.
Prediction: also called inference, this stage uses a trained model to make predictions about new data (Example: a photo of a cat that I just took with my phone).
Deployment and feedback: deploying the model means using it in the real world, inside an application. It can be tweaked and re-trained with new data as needed.

The Main Types of Machine Learning
There are three main types of it, which are different in the way of the algorithm learning.
These types are called supervised learning, unsupervised learning, and reinforcement learning.
First, let’s talk about supervised learning.
As the name suggests, in this type of learning process, the algorithm is being taught, like a child. Someone tells it what to do and how to do it. More specifically, during the training process, a person gives the algorithm a set of training examples, which means that they show the computer what is the input and what is the corresponding output.
The goal of the supervised learning is to enable the computer to learn the mapping function and correctly predict the output when it is given an unknown input.
Classification and regression are the two main types of supervised learning.
For instance, in classification, the computer is used to categorize information (e. g. whether a particular email is spam or not), while in regression, the algorithm predicts, guesses values (for example, the prices of real estate).
Now, let’s move on to the second type – unsupervised learning.
In this mode, the algorithm is not told what to do; instead, it is left alone to discover patterns and structures within the data. The training process includes only the input data; the computer is supposed to find correlations and group the similar data together without any guidance.
The goals of this type are various, but they generally include finding the underlying structure of the data set for an easier analysis and gaining some insight into the data.
The two main types of unsupervised learning are clustering and association.
The former is often used in marketing to segment customers and recommend products, while the latter discovers interesting relationships that were previously unknown.
Finally, the third type, reinforcement learning, is the one where the algorithm is trained by itself. This mode is the closest to the way humans learn: through constant trial and error. In order to perform a certain task, the algorithm must determine which action to take in a certain situation. It gets a reward for correct actions and is penalized for the wrong ones; ultimately, it learns to maximize the number of rewards.
Reinforcement learning allows the computer to become good at some specific tasks, such as playing a game.
For instance, it can be used to teach a robot to walk or even for training self-driving cars.

Why is Machine Learning So Important Right Now?
ML is not a new concept, but recently it has gained unprecedented attention and development for several reasons:
Large amounts of data are being generated and made available (thanks to the Internet), and data is essential for training ML models.
The growth of powerful and affordable parallel processors has made it possible to train ML models in a reasonable amount of time.
Ongoing research has led to the discovery of better algorithms, especially for deep learning, which is a subclass of ML involving neural networks with many layers.
Examples of Use of Machine Learning
Many of us use some form of ML algorithms every day. Some examples are:
recommendation systems like those used by Netflix, YouTube, and Amazon
voice assistants like Siri or Alexa
online fraud detection
Google Maps’ arrival estimation
automatic photo tagging on Facebook
email filtering
In short, ML is a revolutionary technology that allows computers to find hidden patterns and make intelligent decisions based on that information, fundamentally changing the way we design software.

