What is Machine Learning? 

     Machine Learning is closely related to Statistics and Artificial Intelligence. Machine Learning is about using certain algorithms to learn from data, get insights from it and make predictions.

What are the types of Algorithms used in Machine Learning?

     There are a lot of algorithms used in machine learning. But all of them are classified under 3 categories.

1.) Supervised Learning.

2.) Un-Supervised Learning.

3.) Reinforcement Learning.

Supervised Learning :

     To understand what supervised learning is, lets assume i have some data of Height vs Weight. 

Supervised Learning example

     The data is just for demo purpose, its not real data. I have just plotted the data (blue points in the picture). Using just this data, can you tell me what the weight of a person who is 6'2 would be?

     I hope you would have guessed 62 Kg. Well this is supervised learning. You basically had data of certain people and using only those you can predict the weights of people whose data is not present in the table.

     So Supervised learning is used when you have the dependent variables (weights data in our case) for some independent variables (heights). So using this data, the supervised learning algorithm can learn and predict values for new independent variables.

     Some common Supervised Learning algorithms are:

  • Linear Regression
  • Polynomial Regression
  • Logistic Regression
  • SVM (Support Vector Machines)
  • KNN (K Nearest Neighbours)
  • Neural Networks
  • Decision Trees
  • Naive Bayes
  • Random Forests

Un-Supervised Learning : 

     In Un Supervised learning we only have input data points without any labels. We are required to find patterns in the data (or clusters) and using those patterns, we can predict to which pattern (or cluster) the new data belongs to.

Unsupervised algorithm example

     Please observe figure A, We have certain data points in 2 dimensions. These data points have no labels. So we cannot differentiate them. But since they are in lower dimension, we can visually identify there is some pattern. There are 3 clusters (see figure B). This is unsupervised Learning. So if we are given any new data point, we can classify it into one of those 3 clusters based on how close it is to that cluster. If the new data point is far away from all those 3 clusters, we can simply add new cluster and name it as cluster 4.

Some common Un-Supervised Learning algorithms:

Clustering :

  • K-Means Clustering
  • Hierarchical Clustering

Dimensionality Reduction :

  • PCA (Pricipal Components Analysis)
  • SVD

Reinforcement Learning :

     Reinforcement is all about letting an agent (or computer) to interact in an environment and do certain things to get positive rewards.

    Lets consider an example of you training your dog to do some tricks. If your dog does it right, you will reward it by giving a treat. If it does trick wrong, you simply punish it by not giving any treat. The dog will learn from its mistake by itself and continues to do things which are rewarding.