🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to Machine Learning Notes
Topic #3

Types of Machine Learning

Machine learning splits into categories based on what kind of feedback the algorithm learns from — labeled examples, no labels at all, a mix of both, or rewards from an environment.

The Main Categories

TypeLearns FromGoalExample
Supervised LearningLabeled data (input + correct output)Predict labels for new inputsPredicting house price from size, location
Unsupervised LearningUnlabeled dataFind structure/patternsGrouping customers into segments
Semi-Supervised LearningA little labeled + lots of unlabeled dataPredict labels, cheaper to collectLabeling a few medical scans, using thousands of unlabeled ones
Self-Supervised LearningUnlabeled data, with labels generated automatically from the data itselfLearn general-purpose representationsPredicting a masked word in a sentence
Reinforcement LearningRewards/penalties from an environmentLearn a sequence of actions (a policy)A game-playing agent, a robot arm

Supervised, Visually

# Supervised: X (features) paired with y (the correct answer)
X = [[1200, 3], [800, 2], [1500, 4]]   # sq ft, bedrooms
y = [55, 38, 72]                       # price in lakhs — the "supervision"

# Unsupervised: only X, no y
X_unlabeled = [[1200, 3], [800, 2], [1500, 4]]  # find groups/patterns, no target given

How to Pick the Right Type

  • Do you have historical correct answers to learn from? → Supervised.
  • Do you want to find hidden structure with no target variable? → Unsupervised.
  • Do you have a little labeled data and much more unlabeled data? → Semi-supervised.
  • Are you training on raw data by predicting parts of it from other parts (no human labels at all)? → Self-supervised — this is how most modern LLMs are pretrained; see Generative AI notes.
  • Does an agent take sequential actions in an environment and get delayed rewards? → Reinforcement learning.

Common Mistakes

  • Calling clustering "classification" — classification is supervised (labels exist); clustering is unsupervised (no labels).
  • Assuming reinforcement learning is needed for any "AI agent" — most business ML problems are supervised, not RL.

Interview Relevance

Q: "How is semi-supervised learning different from self-supervised learning?" Semi-supervised still uses some human-provided labels; self-supervised generates its own "labels" from the structure of the raw data (e.g. hiding a word and predicting it) — no human labeling required.

Practice Question

Classify each as supervised, unsupervised or reinforcement learning: (a) predicting tomorrow's stock price from historical prices, (b) grouping news articles by topic with no topic labels, (c) training a robot to walk by trial and error.

Want to go beyond the notes?

Join CodingNow 2.0's Machine Learning course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Types of Machine Learning – FAQs

Quick answers about learning Types of Machine Learning in Machine Learning.

This free note from CodingNow 2.0 explains Types of Machine Learning in Machine Learning — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every Machine Learning topic on CodingNow 2.0, including Types of Machine Learning, is 100% free with no signup required.
With focused practice, most students grasp Types of Machine Learning in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now