Machine Learning an introduction

What is Machine Learning

Machine Learning is actually everywhere in our daily life. When we use the Netflix suggestion for the next film, or when Spotify suggest us a song that can match our taste, all of these are an example of applied machine learning. But how does all this software work and what are the ingredients for a machine learning system?

How a machine learn?

Machine Learning is a subfield of artificial intelligence, as we had seen in the previous article, often the term is used interchangeably, but they are different. Machine learning is a set of algorithms that allows the machine to learn how to perform a specific task based on the data. But how a machine can learn?

First of all, it is important to understand the basis of machine learning, and how this helps a machine to “learn”, and all start from the data.

In our modern world, we are overwhelmed by the data, every single minute of our life we produce or consume data, just think on every time you read a post on Facebook and leave a like, or when you post a tweet on Twitter, all this incredible amount of data, are the fuel for the machine learning algorithms.

In machine learning, we can adopt three major techniques for learning:

  • Supervised learning
  • Unsupervised learning
  • reinforcement learning

Supervised learning, is a technique where the data are labelled, this helps the computer to correctly classify the data, which means the data are grouped for types.

Figure 1 – The MIST dataset an example of Supervised Learning

On the other side, we can find the unsupervised learning technique where the data are not labelled, this means the algorithm classifies the data based on the data itself, for example finding information in common.

The last technique for learning is called reinforcement learning, this technique is probably the most complex, in reinforcement learning, we create a system, aka an agent, that learn based on the feedback the agent received from the external environment, for example, in a game the result of a win or lose can indicate a correct or wrong path to follow.

Both the technique, supervised and unsupervised, have a common base, they learn from the data, data are the fuel for the machine learning algorithms.

The last technique, reinforcement learning, is on the other side based on a different principle, this technique uses the feedback received for improving and learning.

Supervised learning

Supervised learning is a family of algorithms, used in machine learning to make a prediction based on evidence in the presence of uncertainty.

This technique is the most simple in machine learning, and it’s similar to what we do when we teach our kids, we essentially provide an example, the labelled data, and teach how to use and recognize the data.

Supervised learning uses two specific techniques for developing machine learning models:

  • Classification
  • Regression

Classification is used for simple classification problems, is used to recognize if a mail is genuine or spam, or for example is used to classify the type of cancer benign or not. A classification always split the data into two specific categories.

Common classification algorithms are:

  • Logistic Regression
  • Naive Baysen
  • K-Nearest Neighbors
  • Support Vector Machine
  • Decision Tree

We see in detail all these algorithms in a few future articles, for now, let’s just say this is all algorithms for classification.

Regression is used to predict continuous response, this is used for example to classify the forecast value for a financial market, or for example for understanding the variance of a temperature or a house price variation.

Common regression algorithms are:

  • Multi Linear Regression
  • Support Vector Machine
  • Decision Tree

We see and go deeper on classification and regression problems in the future article, where we can have a clear identification of the problem and a better understanding of the algorithm.

Unsupervised Learning

In supervised learning, we have labelled data and we apply an algorithm to predict and assign a label to new data. With unsupervised learning, the learning is different.

Unsupervised learning is used to learn directly from the data, without having any knowledge about the data before, the principal algorithm for unsupervised learning are:

  • clustering
  • neural network

We see more about unsupervised learning later in the series, and we see how to use and powerful this technique is, let’s now introduce the last of the three types of machine learning, reinforcement learning.

Reinforcement learning

The last technique of machine learning we present is reinforcement learning, this technique is probably the most complex but probably the most near to the human way to learn.

The goal of reinforcement learning is to develop a system, aka an agent, that improves performance based on the interaction with the environment, this means every iteration of the result predicted by the agent, will be validated by the environment.

In reinforcement learning, the agent receives rewards for every interaction, this reward indicates how good the model score versus the result we want to achieve, one good example of reinforcement learning is an engine of the game of Go, the agent can try to predict the next move based on the actual position of the piece on the board, if the prediction is right, the reward will be positive, in case the prediction is false, the reward will be negative.


In this article, we just had a short introduction to the basic types of machine learning. We saw what are the three main types of machine learning and we see the main difference between the types.

In the next articles, we go deeper on the different types starting with Supervised Learning. Machine Learning is one of the most fascinated fields in computer science, in this article and in the next of the series, I try to help you to develop some basic knowledge about machine learning.

An introduction to Artificial Intelligence

Artificial Intelligence, is the science of making machines do things that would require intelligence if is done by a men – Marvin Minsky

Artificial Intelligence is a term first coined at Dartmouth college in 1956, the term was coined by the Cognitive scientist Marvin Minsky.

When we talk about Artificial Intelligence, we talk about a different set of mathematical algorithms used for learning from the data.

Types of Artificial Intelligence

By definition, Artificial Intelligence is the science of making a machine, do things that would require intelligence.

Based on the definition we can define three types of artificial intelligence:

  • Artificial Narrow Intelligence, aka Weak AI, is the type of AI we saw every day, this is a basic type of intelligence and is used in our actual technology, this type of intelligence is used for one scope only, example of this type of Intelligence are for example the voice assistant like Srini or Alexa, the raking system, the NLP
  • Artificial General Intelligence, this type of intelligence is when the machine are able to learn and generalize like an human do, is able to learn and produce generic result, for some expert this type of artificial intelligence is impossible to achieve
  • Artificial Super Intelligence, this type of intelligence is a type of artificial intelligence where the intelligence is more higher then an human can do

How we can see there are different types of artificial intelligence, at least the theoretical level, and all have in common the goal to make a machine learn.

Domains of artificial intelligence

In this article, we talk about Weak AI, the actual AI we see and work on every day.

Figure 1 – The domain of the artificial intelligence

Figure 1 shows the subdomain of artificial intelligence, Machine Learning and Deep Learning.

Machine Learning is essentially a set of algorithms used for allowing a machine to learn, on the other side the Deep Learning, is a subset of methods direct derived from Machine Learning.

Machine Learning and Deep Learning

Machine Learning and its subfield Deep Learning are the core of the actual artificial intelligence, the weak AI.

Machine Learning is a subfield of computer science, the aim of machine learning, is to learn to execute a task, for which is not directly programmed, from the data.

The capability to learn from the data is an important capability from machine learning, and for artificial intelligence in general, this because, similarly how a man, or an animal, learn from experience, a computer learn from the data.

Deep Learning, is a subset of machine learning, deep learning uses a subset of the algorithm designed for machine learning and is used to solve some practical industrial problem. Some deep learning applications are for example computer vision, or natural language processing/natural language understanding.

Deep Learning differs from machine learning, and in some way expand machine learning, because in deep learning we use a set of algorithm called artificial neural network. This family of algorithms is inspired by the human brain.


In this short article, we just introduce what is artificial intelligence and what is the basic component of artificial intelligence. This is a first of a series of articles where we explore the different methods and algorithms used in artificial intelligence.

Every article made a deeper knowledge around a specific area of the field and is designed to give some practice knowledge in the exciting science of artificial intelligence.