Types of Machine Learning

Heena Girdher
Analytics Vidhya
Published in
5 min readNov 30, 2021
Photo by Ali Shah Lakhani on Unsplash

Machine Learning is the field of artificial intelligence whose main purpose is to make machines intelligent that can take decisions on their own by using knowledge and past experiences. Let us take a real-life example to understand Machine Learning. Suppose a person visits a doctor for a check-up. The first question asked by the doctor is how are you feeling. The person tells the symptoms to the doctor like sweating, fever, cough, sneeze, loss of appetite. Based on the symptoms of the patient, the doctor diagnoses that the patient is having viral fever. The doctor takes this decision by using her knowledge and past experiences.

Photo by CDC on Unsplash

In machine learning, we want to inculcate the same decision-making capabilities of a person into the machines or we can say, we want the machines to behave like humans. To solve a problem using Machine Learning; the selection of the Machine learning algorithm depends upon the type of problem at hand and the type of data available.

Supervised, Unsupervised and Reinforcement learning are three types of Machine Learning.

Supervised Learning

In Supervised Learning, the data is labelled, which means that for the given set of inputs, we have the output variable and a model is trained based on the existing data to predict the output for a new set of inputs. For instance, we want to know whether a customer with a given profile will buy the laptop or not. And, we have the details of customers like age, salary, student and class variable buys_laptop as shown in fig 1.1. Here, we have a class variable for every set of inputs which means data is labelled. In supervised learning, the machine learning model is trained with this data, features are extracted from the data and output for the new set of inputs is predicted.

Fig 1.1. Customer Dataset

Supervised learning can be classified into two types- Classification and Regression.

Classification: — Classification is the task of classifying the value of a variable into multiple categories. In classification, the target variable (y) is categorical means the value of y is a category, such as yes or no, cat or dog, etc. For instance, we want to predict that whether a person is having cancer or not, the answer is “yes” or “no”. There are various types of classification algorithms like Support Vector Machine (SVM), Decision Tree, Random Forest, Logistic Regression, K-Nearest Neighbors and Naïve Bayes.

Regression: — In Regression, the target variable (y) is continuous means the value of y is a real number. For instance, we want to predict the price of a car. The answer will be a real number. There are various types of Regression algorithms like Linear Regression, Multiple Regression.

Let’s talk about Unsupervised Learning

In unsupervised learning, the data is unlabeled which means the output (y) variable is missing from the data as shown in Fig 1.2. The unsupervised learning method learns the patterns from the data based on some characteristics. For instance, We have the transaction details of customers of a shopping centre and we want to predict the buying patterns of the customers like if a person purchases a burger, he is likely to purchase a cold drink and French fries. By understanding the buying patterns of the customers, we can generate Marketing strategies and increase business revenue.

Fig 1.2. Transaction Details of Customers

Recommendation systems used in various applications like Netflix, YouTube, and Ecommerce websites is another example of unsupervised learning. Unsupervised learning can be divided into two types- Clustering and Association rules.

Clustering- It is the process of grouping similar items based on their features. There are various types of methods of clustering like k-means, k-medoids, hierarchical and density-based clustering.

Association Rules- It is the process of finding rules from the data. Based on the rules, business decisions can be taken and revenue can be generated.

Let’s talk about Reinforcement Learning

Reinforcement learning is another type of machine learning which is based on cause and effect relationships. In Reinforcement Learning, agents (machines) are given a goal and agent uses trial and error method to achieve that goal. Agent senses the environment and performs the set of actions. Based on the action taken by the agent, it is rewarded (positive or negative). The main focus of the agent in Reinforcement Learning is to maximize the reward. In this type of learning, machines learn by their own experience based on the type of reward.

Fig 1.3. Reinforcement Learning

For instance, a class teacher in the school rewards a child for good homework by giving him chocolate. Based on the reward, the child comes to know that if he does good work, the teacher will reward him and he tries to do the good homework to get the reward.

Autonomous cars are also one example of Reinforcement learning. In a driverless car, an agent (machine) senses the road condition (environment) and take suitable action to avoid the accident. The focus of the car is the safety of people.

Reinforcement Learning can be classified into two types:-

Positive- It is characterized as an event that happens on account of explicit behaviour. It increases the strength and the frequency of the behaviour and effects emphatically on the action taken by the agent.

Negative- Negative Reinforcement is characterized as the strengthening of behaviour that happens due to a negative condition that ought to have been halted or avoided.

With both positive and negative reinforcement, the objective is to increase the behaviour. The thing that matters is that with negative reinforcement, the behaviour results in taking something disagreeable away. With positive reinforcement, the behaviour results in acquiring something desirable.

--

--

Heena Girdher
Analytics Vidhya

Software Engineer@Accenture, PhD. Research Scholar, UGC NET Qualified, HTET Qualified