Part-II : Types of Machine Learning

Basic Machine Learning Tutorial Series-2

Raju Thapa
AIDevNepal
4 min readApr 16, 2018

--

In the previous tutorial we got basic insights on introduction as well as applications of machine learning. I hope you started your journey of learning python, numpy, pandas and matplotlib from the resources (datacamp, dataquest, youtube etc) i mentioned there. Take your time and practice the basic stuffs. Make your data science learning environment more enjoyable. I bet you can make it.

Now let us start our today’s mission on understanding the different types of machine learning algorithms. All the real world machine learning problems are categorized as:

  1. Supervised Machine Learning
  2. Unsupervised Machine Learning
  3. Reinforcement Machine Learning

Lets see this image:

Image source: www.analyticsvidhya.com

Before starting lets understand some basic terminology we use in machine learning:

Input data given to machine learning = Training Data

Training Data includes both: Input ( Features ) and Output ( labels, target : this can be numeric values or string labels)

1. Supervised Machine Learning:

This consists of target (output or dependent) variable which is to be predicted from given set of input (independent) variable. Here, we try to generate a function that maps our inputs to desired outputs using those independent variables. More clearly, we try to model relationships and dependencies between our input and output such that we can predict the output of totally NEW data. Until and unless the desired level of accuracy on the training data is not achieved, we continue our training process. Important thing is that more the amount of data better will be our performance of model to unknown data.

Types of Supervised Learning:

Supervised Learning is further classified into two categories: Regression and Classification

Regression: It is used for predicting continuous output. Examples are:

  • Predicting the price of a house in a city.
  • Predicting the Score of Students with respect to Time Spent in studying.
  • Predicting the value of the stock.

Types:

  • Linear Regression
  • Non-Linear Regression
  • Polynomial Regression
  • Logistic Regression (used in binary classification: two possible outcomes)

Classification: It is used for predicting the categorical response where data is separated into “classes”. Examples are:

  • Cat Vs Dog
  • Spam / Not Spam
  • Digit recognition

Types:

  • Binary Classification: (Yes/No | 0/1) type of classification:eg. Hotdog? Or Not Hotdog?
  • Multiclass Classification: Have 2 or more classes (cat Vs Dog Vs Tiger)
Image source: https://cdn-images-1.medium.com

Algorithms Used in Supervised Machine learning:

  • Regression (Linear, logistic)
  • KNN (K-Nearest Neighbor)
  • Decision Tree
  • Random Forest
  • Naive Bayes
  • Support Vector Machines (SVM)
  • Neural Networks

2. Unsupervised Learning:

Unsupervised learning does not have target or outcome variable to predict. The system is trained with unlabelled data and tried to learn the patterns in data. This helps in summarizing and grouping of data in the form of clusters which helps us to derive meaningful insights and describe the data to user.

Image source: https://cdn-images-1.medium.com/

Thus, unsupervised machine learning is used to recognize patterns, similarities and anomalies in data.

Algorithms Used in Unsupervised Machine Learning:

3. Reinforcement Learning:

In reinforcement learning, a machine is exposed to the outer environment and it trains itself with lots of trial and errors. Machine is trained on REWARD and PUNISHMENT base received from the last action if performed. For a certain activities performed in outer environment, the machine is either rewarded or punished. Also it can be said that the machine can act depending upon the positive or negative feedback. Reinforcement learning is used in a situation where there is need of taking decisions so the product is prescriptive, not just descriptive as in unsupervised learning.

Image source: http://web.stanford.edu

An exciting example could be a computer program tries to play game own its own. Eg. Google DeepMind reinforcement learning computer program that plays old Atari’s video game.

Atari Game Using Reinforcement Learning

Algorithms used in Reinforcement Learning:

  • Q-Learning
  • State-Action-Reward-State-Action (SARSA)
  • Deep Q Network (DQN)
  • Deep Deterministic Policy Gradient (DDPG)

Major Domains where reinforcement learning is being used:

  • Robotics
  • Medicine
  • Gaming
  • Vehicular Navigation

Previous: Basic Machine Learning Tutorial Series -1

Next: Part-III : Various Algorithms Used in Machine Learning

References:

--

--

Raju Thapa
AIDevNepal

Data Science — AI/ML Practitioner — “Knowledge not shared is wasted” — Clan Jacobs