Coding Now – Best AI & Full Stack Courses in Delhi NCR | 100% Placement
Limited Offer: Get 50% OFF on AI & Full Stack Courses
📞 Call Now: +91 9667708830
Back to Machine Learning Notes
Topic #103

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.

Related ML Notes

Want to go beyond the notes?

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

Enroll Now — Free Demo Available
💬 Talk to Advisor
1
WhatsApp

Latest from Our Blog

Insights on AI, Data Science, Full Stack & Career

View All Articles →