Skip to main content

ML Basics

Understanding Types of Machine Learning Algorithms

Artificial intelligence (AI) is processes and algorithms that are able to simulate human intelligence, including mimicking cognitive functions such as perception, learning and problem solving. Machine learning and Deep learning are subsets of AI.

Machine Learning (ML) is "the field of study that gives computers the ability to learn without being explicitly programmed" - Arthur Samuel, 1959. In other words, ML is the field of study where we make machine learn by training the machine with the data we have.

Types of Machine Learning

There are different types of machine learning algorithms that are broadly categorised based on the nature of learning task and the type of output they produce.

1. Supervised Learning

In supervised learning, the algorithm is trained on labelled dataset, which means that dataset has both input and output values.

Figure of Supervised Machine Learning
Fig-1: Supervised Machine Learning

Example: Consider House-Rent Prediction dataset from below table, in which we have features such as BHK, size, floor, area type, area locality, city, furnishing status, tenant preferred, bathroom, point of contact and rent.

Dataset from Kaggle, house-rent prediction
Fig 2 - Dataset from Kaggle, house-rent prediction

From this dataset we can easily find what are inputs(features) and what are output(target variable). Here features are all columns except 'Rent' and our target value is 'Rent'.

Types of Algorithms:

  • Classification: Logistics regression, Random Forest, SVM, Decision tree, KNN etc
  • Regression: Linear regression, Ridge regression, Lasso regression, Polynomial regression, Random Forest, SVM etc.

Applications:

  • Email Spam detection
  • House price Prediction
  • Fraud detection
  • Weather Forecasting
  • Natural language processing: Extract information from text, such as sentiment, entities, and relationships

2. UnSupervised Learning

In unsupervised learning, the algorithm is trained on un-labelled dataset, which means the dataset doesn't have both input and output values. This type of model predicts the output based on input pattern.

Figure of Unsupervised Machine Learning
Fig3: Unsupervised Machine Learning

Types of Algorithms:

  • Clustering: K-means Clustering, Mean-Shift Algorithm, Principle Component analysis, DBSCAN Algorithm etc.
  • Association: Apriori Algorithm, Eclat, FP-Growth algorithm etc.

Applications:

  • Clustering like group similar data points into cluster
  • Market analysis: Discover association between products
  • Topic modelling: Discover latent topics within collection of documents
  • Content recommendation: Classify and tag content to make it easier to recommend similar items to users.
  • Image segmentation: Segment images into meaningful regions.

3. Semi-Supervised Learning

Combination of supervised and unsupervised learning. It combines the small amount of labelled data with large amount of unlabelled data during training. This approach is useful when dataset is expensive, time-consuming and resource intensive.

Figure of Semi Supervised Machine Learning
Fig-4: Semi Supervised Machine Learning

Types of Algorithms:

  • Graph-based: uses graph to represent relationship between data points. Propagate models from labelled data points to unlabelled data points.
  • Co-training: Train two different ML models on different subsets of unlabelled data and then used to label each other predictions.
  • Self-training: Trains the model on labelled data and then uses this model to predict labels for unlabelled data.

Applications:

  • Image and Object classification
  • Speech recognition
  • Natural Language Processing (NLP)
  • Recommendation systems

4. Reinforcemnt Learning

In reinforcement learning, an agent learns to make decisions by performing actions in the environment and receiving feedback in the form of rewards or punishments. In other words, the model keeps on increasing its performance using reward feedback to learn the behavior and pattern.

Figure of Reinforcement Machine Learning
Fig-5: Reinforcement Machine Learning

Example: Consider that you are training an AI agent to play a game like chess. The agent explores different moves and receives positive or negative feedback based on the outcome.

Types of Algorithms:

  • Q-Learning: Seeks to find best action to take given in the current state.
  • SARSA (State-Action - Reward - State-Action): Learns from the Q-function for the action that was actually taken, rather than the optimal action.
  • Deep Q-Networks (DQN): Combines Q-learning with deep neural networks.

Applications:

  • Autonomous vehicles like self-driving cars
  • Robotics
  • Augumented Reality (AR) and Virtual Reality(VR)
  • Recommended System based on user preferences