data science

Towards an understanding of machine learning

5 Mins read
Towards an understanding of machine learning

Are you interested in Artificial intelligence? Is your brain craving to know what machine learning is and how it is being implemented in our society today? Then, you are in the right place. This article provides a basic introduction to Machine learning (ML) and its surrounding topics.

Before we begin, let’s have a quick look at topics that this article covers

  • History of Machine learning
  • Introduction to machine learning
  • Need for machine learning
  • Types of machine Learning

History and timeline of machine learning

From being a part of science fiction to becoming integral part of our lives today, machine learning is helping us with almost everything from detecting pictures to self-driving cars. Without the groundwork of early scientists, there wouldn’t be any computing machines. This started with Blaise Pascal, French mathematician, inventing “arithmetic machine” for his father who was a tax collector, to the Universal Machine invented by Alan Turing, an English logician and cryptanalyst. He theorized how a machine might decrypt and execute a set of instructions and his proof is taken to consideration as basis to computer science.

a simple timeline of the evolution of machine learning (taken from Google Cloud)

Within half a century, the then science fiction turns real.  Paper on how human neurons might work was co-written by a neurophysiologist and a mathematician. They modeled a neural network with electrical circuits in order to illustrate the theory. By late 1990, computer aided cancer diagnosis came into existence. This CAD Prototype Intelligent Workstation was developed at the University of Chicago and the accuracy of cancer detection by this was 52% more than the one by radiologists.

Later, machine learning became part of our lives in form of applications in various industries. This started from Geoffrey Hinton’s rebranding neural net research as “deep learning”. This was followed by various accomplishments like Google Brain’s human face detection in images, natural language processing and DeepMind’s AlphaGo – self learning agent developed using reinforcement learning beating the human Go champion.

Introduction to machine learning

Machine learning is an application that enables a system to learn and improve a relationship existing between inputs and outputs from experience without being explicitly programmed. Someone with even a basic knowledge in programming irrespective of language, would be able to grasp the abstract meaning of machine learning. Machine learning learns the relationship between input and output from historical data and computes an algorithm that would process future unknown inputs to calculate its output.

Basic concepts in Marchine Learning

Aurélien Géron in Hands-on Machine Learning with Scikit-Learn and TensorFlow defines Machine learning as “Machine learning is the science (and art) of programming computers so they can learn from data. Using labeled data, the model is trained (labels are the names of data, which the model needs to learn and predict) and using test data, the trained model predicts output.

Need for machine learning

The big data age is upon us and large amount of data is being generated and stored in the past few years. From being a fancy buzzword, the topic of machine learning has fast become a necessity now. With vast amount of data, it is important to derive meaningful insights from them and put them to use. Advantages of machine learning over traditional hard-coded formula based calculation especially in case of big data is, (i) Machine learning algorithms can look at all the data available to construct a relationship, (ii) Machine learning is performed by computers and hence be automated to process newly added data to update its previous learning. Today, machine learning is used in almost every sector like medical, automotive, banking, manufacturing etc. Machine learning has become part of our daily life in the form of Fitbit, Google Home, chatbots, Siri etc.

Other examples of machine learning in use:

  • Prediction – Machine learning can be used in prediction systems like forecasting sales, weather, etc.
  • Image recognition – Machine learning is used in detecting images. Google image search, self-driving cars, etc. are few applications where image recognition algorithm is used.
  • Speech Recognition – Another important area where ML is widely used is speech recognition. Digital assistants help people in basic tasks and respond to their queries. They can access information from huge data bases and other digital sources. Thereby, these robots help in real time problems and improve human productivity and user experience.
  • Medical – Machine learning is trained in medical applications such as cancer tissue detection.
  • Finance and trading – Organizations use machine learning in fraud investigations and checking credits.

Types of Machine learning

 There are different types of machine learning algorithms used for different purposes.

Types of machine learning (Image taken from Samurai’s Sakura)

Supervised learning

In supervised learning, an AI system is presented with labeled data, i.e. each data is tagged with a label. This means that the for each input, its corresponding output recorded from historical experiences is provided to the algorithm so that it constructs a model that captures the generic overall mapping between the input and output.

Example:  Marking e-mails that are Spam and Not-spam. Labeled data is used to train the model. Once the model is trained, it is tested with new test e-mails and the model is checked how far it can classify this test e-mail (spam vs not-spam).

Image for post
Spam vs not-spam supervised learning model (Image taken from Towards Data Science)

There are two types of Supervised learning:

  • Classification: Classification algorithms are used when the output variable is a category (discrete variable) such as “black” or “white”, “spam” or “not spam”.
  • Regression: Regression algorithms are used when the output variable is a real value (continuous variable) such as “dollars” or “height”.

Unsupervised learning

An algorithm is presented with unlabeled and uncategorized data in unsupervised learning algorithm. This means unlike the supervised algorithms, the corresponding output for each input is not provided during model building. Algorithm acts on the data without any prior knowledge of the output. Objective of unsupervised algorithm is to find the underlying structure of the input data, grouping or categorizing the data according to similarities and representing the dataset in compressed format.

Ducks vs Not Ducks unsupervised learning (Image source)

Example: Categorizing/Distinguishing “Ducks” and “Not Ducks” . There is no output label to any of the inputs during model building phase and yet the algorithm can distinguish between classes based on the inherent distribution and characteristics of input data.

Reinforcement learning

Reinforcement learning (RL) is a branch of machine learning (ML), where an agent/algorithm learns the best possible group of actions or a sequence of actions to take in an environment, in order to achieve a task with maximum possible performance and efficiency. The agent takes a trial & error route and performs different actions in the environment. The environment provides the agent feedback about how good each attempt of trial & error was, through rewards or penalties. This forms the foundation of the learning process and eventually the RL agent can take the appropriate action given a situation in that environment.

RL falls under neither supervised learning nor unsupervised learning but forms a different branch in machine learning. Examples of Alpha GO and other famous Artificial Intelligence (AI) algorithms beating the human champions in their own game, shows the significance of RL in the recent past, although the concepts have been in existence for quite some time. In RL, the agent produces its own data on the go, as it attempts to learn the task by performing actions through trial & error method and thus is a separate branch of ML.

Reinforcement learning methodology example (Image source)

An agent is given two options namely, a path with fire or a path with water. A reinforcement algorithm subtracts points if the agent uses the fire path. Through this, the agent learns that it should not take the fire path. Rewards are given when the agent chooses water path, through which agent learns that, this is the safer path. At the end of the training phase, agent would be able to navigate safely avoiding the dangers.

Related posts
data science

The Data Scientist: Explorer of the Data Universe

2 Mins read
There is a big misconception when it comes to data scientists. “People often think it’s magic”, Setareh Sadjadi says. They tend to…
data science

Where Linguistics meets Natural Language Processing - Part I

3 Mins read
For someone working with Natural Language Processing/Understanding (NLP/NLU), it brings a lot of value to incorporate a formal understanding of how languages are structured, beyond…
data science

How conversational commerce moves shopping habits

1 Mins read
Artificial intelligence has paved a way for digital marketers to watch their customers’ decision-making process, closely and carefully; to understand their needs and…