01 – Artificial Intelligence / Machine Learning Introduction

As a quick introduction, we will understand Machine learning and then move on to implementing this using Facebook’s “Pytorch”. I will also be sharing a series of implementing machine learning using Google’s “TensorFlow” too.

Machine learning : This is a way in which the machines try to learn the problem and then over time it shall provide solution to those inputs which the machine hasnt seen. In other words this is analogous to have a new born baby learns things by looking at its surroundings etc.

Types of Machine learning :

  1. Supervised learning : This is where we as humans, tend to provide inputs to the machine and over time machine will understand and start predicting values. This is mostly task driven. There are further 2 subtypes of this type of learning viz.
    • Classification : This is where we teach the algorithm to classify e.g : if we get input as Color ( in terms of redness) : Red, Shape : Round, Weight: 100 gms then this is Apple, whereas if Color : Orange, Shape : Round, Weight : 60 gms then this is Orange etc. So here the entities Shape,Color,Weight etc are called Features, and Orange/Apple this is a called as Labels. So for a new value as the machine has now learnt based on the tags, it can start classifying now. This has further 2 types :
      • Binary Classification : This is basically Yes/No questions e.g : Is this fruit Apple ? Is this mail a Spam ? Will it rain today.
      • Multi-Class Classification : This is more of classficiation with more than 2 classes e.g :Is this fruit Apple, Orange or Banana, Is the mail Spam, Important, Promotion or Updates etc
    • Regression : This is where the algorithm predicts a correct value as supposed to classification e.g : Using the inputs like Size of House : 800 sqft, Location: Pune, Area: Shivaji Nagar, IsNewlyConstructed : Yes then the valuation of the house is ~ 35 L . So mostly this is a number between negative Infinity to Positive Infinity

      Image result for supervised learning
      Image credits : http://bigdata-madesimple.com%5D

  2. Un-Supervised learning : This is where the machine tries to understand the data and then analyze and predict. We don’t guide the system in this methodology, the system as to self understand and then predict. There are basically 2 types of Un-supervised learning :
    • Clustering : This is the most frequent use case of Un-supervised learning, where we ask the machine to group similar things together. This is somewhat similar to Multi-Class Classification, however here we do not provide any Labels, the machine has to figure it out. e.g : Cluster based on sentiments on a tweet, cluster different types of news given all set of news content etc
    • Anomaly Detection : The system tries to learn from a set of inputs and predict whether there is an anomaly in the input. e.g There is a bunch of inputs coming from sensors , this algorithm shall detect whether there is an anomaly

      Related image
      [Image credits : http://bigdata-madesimple.com%5D

  3. Reinforcement learning : This where an algorithm tries to react to an environment in real time. This is based on Reward mechanism where the algorithm grants reward for a correct observation/action or rewards are taken back for an incorrect observation/action. The weight of rewards granted or taken back depending on importance/criticality etc. An image ( taken from google) is as below

    Image result for reinforcement learning

    Most common use case of Reinforcement learning is Autonomous Cars.

Leave a comment