Skip to main content

Command Palette

Search for a command to run...

2. Types of Machine Learning & their basic workflow

Updated
4 min read
2. Types of Machine Learning & their basic workflow

In previous article of our ML journey , we explored what machine learning is and how it’s deeply integrated into our everyday lives—from voice assistants to Google Maps to health tech. But now it’s time to go a level deeper.

In this article, we will talk about The types of Machine Learning and what a basic ML workflow looks like.

Types of Machine Learning

  1. Supervised Learning — "Learning with Labels"

Imagine you're teaching a child to recognize fruits. You show them apple and say “this is a apple.” That’s supervised learning—we give the machine both the input (features) and the correct output (label) during training. So machine learn pattern from examples and base on that it predicts in the future.

Supervised Machine Learning: Key Differences & Insights

Types of supervised learning

This is based on the types of final output/label.

  1. Classification (Predicting a label or category )
  • Binary Classification: Two outcomes (e.g., spam or not spam)

  • Multiclass Classification: More than two outcomes (e.g., classifying types of fruits)

  1. Regression (Predicting continuous values)
  • Example: Predicting house prices based on size and location

Classification and Regression in Machine Learning

Common Supervised Learning Algorithm

Few are the common algorithms that are used.

  • Logistic Regression – Used for binary classification problems

  • Decision Trees – Splits data into decision nodes for easy predictions

  • Random Forest – An ensemble of decision trees for better accuracy

  • Support Vector Machines (SVM) – Finds the best boundary between classes

  • K-Nearest Neighbors (KNN) – Classifies based on closest data points

2. Unsupervised Learning — "Learning Without labels"

Here, the model works on unlabeled data—no answers are given. It tries to find hidden patterns or structures all by itself.Imagine giving a bunch of photos of apples to a computer and asking it to group similar ones—without telling it what each photo is. That’s unsupervised learning. It finds hidden patterns or structures in data.

Unsupervised Learning: Types, Applications & Advantages

Three Main Categories:

1. Clustering: process of grouping similar data points together based on their characteristics, without using labeled outcomes.

  • Examples

    • Customer segmentation: Grouping customers by buying habits

    • Document clustering: Grouping news articles by topic

    • Social media analysis: Finding communities within a network

2. Dimensionality Reduction: Dimensionality reduction reduces the number of input variables while preserving essential patterns.

It’s like compressing a high-res image without losing much quality—making it easier to store, analyze, and visualize.

Examples

  • Image compression

  • Gene expression analysis in biology

  • Feature reduction before training deep learning model

3. Anomaly Detection ( outlier detection) is about finding data points that don’t conform to the expected pattern—like catching a glitch in the matrix.

Think of a bank transaction that suddenly spikes at 3 AM in a country you’ve never been to. Your bank’s machine learning system probably flagged that as suspicious.

Examples

  • Credit card fraud detection

  • Server/network intrusion detection

  • Nongenerative Artificial Intelligence in Medicine: Advancements and  Applications in Supervised and Unsupervised Machine Learning - ScienceDirect

Common Algorithms:

  • K-Means Clustering – Groups data into k clusters

  • Hierarchical Clustering – Builds a tree of clusters

  • Principal Component Analysis (PCA) – Reduces dimensions for better visualization

  • t-SNE – Visualizes high-dimensional data in 2D/3D

  1. Reinforcement Learning

In reinforcement learning, an agent learns by interacting with its environment and receiving rewards or penalties based on its actions.

It’s like teaching a dog: reward for a trick well done, correction when it doesn’t obey.

What Is Reinforcement Learning? - MATLAB & Simulink

Common Algorithms:

  • Q-Learning – Learns the best action to take in a given state

  • Deep Q-Networks (DQN) – Combines Q-learning with neural networks

  • SARSA – Similar to Q-learning but learns using the actual action taken


Basic Workflow

Regardless of the type, most ML projects follow a common workflow:

Quick Look into Machine Learning Workflow- CodeProject

  1. Problem Definition: What do you want to solve or predict?

  2. Data Collection: Gather the necessary data

  3. Data Preprocessing: Clean, format, and split the data

  4. Model Selection: Choose the right algorithm

  5. Training the Model: Teach it using training data

  6. Evaluation: Test with unseen data to check performance

  7. Tuning: Improve accuracy with hyperparameter tuning

  8. Deployment: Use the model in a real-world application

Conclusion

Understanding the types of machine learning is like learning how different superheroes use their powers. Each type has its unique way of learning and solving problems. So whether you're building a spam filter, a chatbot, or training an AI to play chess, knowing which ML type to use is your first step toward success

More from this blog

M

ML Diaries by Fahd

19 posts