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.

How journaling can be useful for you

Journaling is a great way to express yourself and write down your emotions, the journal is a great way to analyse your emotion and create a space just for you.

What is a Journal

If we search in the dictionary what the term “Journal” means, we can find this definition:

“a written record of what you have done each day, sometimes including your private thoughts and feelings”.

This definition describes perfectly, what the practice of Journaling is and what the idea behind him, the Journal is essentially a “journey” of your day. In the journal you can write all you have done and most importantly all you have felt during the day, without any fear of any judgment, the journal is your personal space and is the time you dedicate to the most important person of your life, yourself.

The benefit of the Journaling

Journaling offers a huge benefit for our mental health. One of the most important is how to deal with overwhelming emotions.

Our daily life can be stressful, in particular with the Covid-19 pandemic crisis, most of us can fell under pressure, the work from home lifestyle most of us are pushed for, the kids at home and the problem with the on house schooling can create a lot of pressure to everyone, and this can lead to an overwhelming of emotions and stress.

Journaling can help us with:

  • Help us manage the anxiety
  • Help us to reduce the stress
  • Help us with depression

Write a journal, and adopt the journaling practice, help us to write down the situation we had lived during the day, this helps us to identify what situation create the stress or the anxiety. When we have identified the situation, we can easily work on a plan to reduce it.

How to journaling

There is no correct or wrong way to do journaling, you can write a journal in a simple notepad or on your computer, the only important thing for journaling is to write down what you have felt during the day, and keep in mind journaling is your daily personal space.

If you want to start journaling there are some tips that can help you to start your journey, at least this is what helps me with my journey:

  • Write at least three A5 pages per day, sometimes you can write less sometimes you can write more, but try to write 3 pages daily
  • Be open and honest, don’t worry about any judgment, write exactly what you feel
  • Schedule daily time for your journaling, have a booked time for the journaling help to be consistent, remember you want to build a habit around the journaling, and have a specific time dedicated to that help
  • When you start, don’t stop just continue to write. Start writing can be hard, for this reason when you start to write don’t stop, just write down what you have in mind
  • Take your time, when you write don’t rush, remember journaling is your time and is the time you use to reduce anxiety and stress

Writing a journal helps us to organize our thoughts and our emotions, this can drive the way to our self-awareness and helps to reduce the stress and the anxiety of the day.

Be a better person with the Emotional Intelligence

one can become angry, that is easy. But to be angry with the righe person, to the right degree, at the right time, for the right purpose, and in the right way, this is not easy. (Aristotele, The Nicomachean Ethics)

What is emotional intelligence?

If we search online for a definition for emotional intelligence, we can found this definition: “Emotional intelligence refers to the ability to identify and manage one’s own emotions, as well as the emotions of others”.

Emotional intelligence plays an important role in our daily life and can be defined using four attributes:

  • self-awareness, the ability to understand our own emotions recognize our strengths and our weakness and how these emotions affect our job and our relations
  • Self-management, the ability to manage our emotions and our behaviour in a productive and efficient way
  • Social awareness, this skill is directly related to empathy, you can understand other people emotions, you recognize and understand the power and the dynamics of a group of people
  • Relationship management, you can have a good relationship, you can communicate clearly and efficiently, and you can influence others and you can manage conflicts in a correct way

The importance of emotional intelligence for your success

My main job is as a Software Engineer, and of course, I daily interact with other team members. In this context, emotional intelligence is more important the IQ.

The why can be easily understood if we think about the four attributes of emotional intelligence.

When we work as a team, have good relations with other members of the team and understand what help others to give the best, is the golden ticket to drive the team productivity.

A recent study from Havard University and released by the National Bureau of Economics Research highlight the importance of emotional intelligence instead of IQ when we work as a group.

The study was made with 255 volunteers and evaluated using a standard test for intelligence and personality, the study shows how people with high EQ are more consistent instead people with only a high IQ.

The reason is simple, people with high emotional intelligence are able to understand how another member of the team feeling simple seeing their face, or during the meeting, they are able to “feel the room temperature” and because of that they can solve the conflict first this start and made all the member of the team motivated.

What makes emotional intelligence so important for our workplace is the capacity to be able to cool down under stress and because of that, people with high emotional intelligence are more successful instead people with the only IQ.

If we want to summarize what emotional intelligence can be useful for us this will be:

  • Help to make better decisions and a better process for problem-solving
  • Help us to stay calm under pressure
  • Help us to resolve conflict
  • Help us to listen better, and because of that to communicate more effectively

These are just some of the benefits brought to us by emotional intelligence.

How we can improve our emotional intelligence

How we can see emotional intelligence is an important skill to add to our repertory.How we can see emotional intelligence is an important skill to add to our repertory. Unfortunately, not everyone has the same level of emotional intelligence, but luckily for us, we can learn how to improve our emotional intelligence.

If we want to improve our emotional intelligence we can follow some simple strategies:

  • learn how we react to different situations, why we react in this way? what emotion trigger us? Do we have some bias? what are our beliefs? This can be done with journaling, for example, journaling is a great way to analyse our behaviour, you can have a small introduction about journaling in my previous post
  • Do a test to understand our weaknesses and our strength, for example, we can use the Gallup test in order to identify our weaknesses and strength
  • Examine how your behaviour impacts others, this helps you to raise empathy
  • Ask for feedback, this can be scary and for sure out of our comfort zone, but ask for feedback is a great way to collect information about ourself

These strategies can help to improve your emotional intelligence, but this is nothing we can do is not an easy task and require a lot of work on ourselves, this means leaving our comfort zone and investing a lot of energy in ourselves.

Personally, when I start my journey to improve my emotional intelligence, I start to read literature around that, one book I highly recommended is Emotional Intelligence: Why It Can Matter More Than IQ by Dr Daniel Goleman, this is one of my favourite books on the topics. But online you can find a lot of documentation on this topic, the important is to start the journey.


How we can see emotional intelligence becomes a very important skill to have in our “toolbox”. Luckily we can learn this skill and we can improve our emotional intelligence and this can help us to have a better quality of life not only in our work but as well in our private life.