Skip to content

Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Artificial Intelligence - Introduction and Basics

Machine Learning and Deep Learning: Basics for CS Professional

Updated 11 October 2026 · Fact-checked

Machine learning (ML) is a part of AI where systems learn patterns from data instead of following fixed rules. Deep learning is a part of ML that uses multi-layer neural networks. ML has three main approaches: supervised, unsupervised and reinforcement learning. In exams, define, classify, compare and give business examples.

Understand Machine Learning and Deep Learning

Artificial intelligence (AI) is the broad aim of making machines do tasks that need human-like intelligence. Machine learning (ML) is one way to reach that aim. Instead of a programmer writing every rule, the system studies data, finds patterns and uses them to make predictions or decisions on new data.

Think of a bank that wants to spot fraud. A rule-based program checks fixed conditions, such as a transaction above a set amount. An ML model studies thousands of past transactions marked genuine or fraudulent. It learns what fraud tends to look like, including patterns no one wrote down.

ML has three main approaches.

  • Supervised learning: the data is labelled. The model learns the link between inputs and known outputs. Examples: predicting loan default, classifying emails as spam or not spam, forecasting house prices. Predicting a category is classification. Predicting a number is regression.
  • Unsupervised learning: the data has no labels. The model finds structure on its own. Examples: grouping customers into segments (clustering), spotting unusual transactions (anomaly detection).
  • Reinforcement learning: an agent acts in an environment, gets a reward or penalty, and learns the actions that earn the most reward over time. Examples: game-playing systems, robot control, dynamic pricing.

A neural network is a model loosely inspired by the brain. It has an input layer that takes the data, one or more hidden layers and an output layer. Each connection has a weight. Each unit adds up its weighted inputs and passes the result through an activation function. During training, the network compares its output with the correct answer, measures the error, and adjusts the weights to cut that error. This is repeated many times.

Deep learning is ML that uses neural networks with many hidden layers. Early layers pick up simple features and later layers combine them into complex ones. It works well on images, speech and text, but needs large data and heavy computing power. Its decisions are also harder to explain, which links to the black-box, bias and accountability issues you study under AI risks. The relationship is nested: deep learning is inside machine learning, which is inside AI.

Key rules to remember

Nesting of terms
AI ⊃ Machine Learning ⊃ Deep Learning
Deep learning is a subset of ML, and ML is a subset of AI. Not every AI system uses ML.
Supervised learning
Labelled data (input + known output) → model learns mapping → predicts output for new input
Output is a category (classification) or a number (regression).
Unsupervised learning
Unlabelled data → model finds hidden patterns, groups or outliers
Main tasks: clustering, anomaly detection, association.
Reinforcement learning
Agent takes action → environment gives reward or penalty → agent improves its policy
Learning is by trial and error, aiming at maximum long-term reward.
Neural network structure
Input layer → hidden layer(s) → output layer
Deep learning means many hidden layers.
Neuron computation
Output = activation( Σ (weight × input) + bias )
Training adjusts weights and bias to reduce error.

How to solve Machine Learning and Deep Learning questions

Use this method for definition, comparison, classification and case-based questions on ML and deep learning.

  1. 1Read the question and mark the task word: define, distinguish, explain, classify or advise.
  2. 2Define the core term in one or two clear lines, and place it in the AI, ML, deep learning hierarchy.
  3. 3For a case, check the data first. Is it labelled, unlabelled, or is there an agent receiving rewards?
  4. 4Match that to the approach: labelled means supervised, unlabelled means unsupervised, reward and action means reinforcement.
  5. 5Explain briefly how it works, using inputs, layers, weights and error where a neural network is involved.
  6. 6Give one Indian business example that fits the facts, such as fraud detection, credit scoring or customer segmentation.
  7. 7Add a short note on limits or risks if the question allows: data quality, bias, lack of explainability, compute cost.
  8. 8Finish with a one-line conclusion that answers the exact question asked.

Quickest way: Data-type test for choosing the learning approach

When to use it: Use when a case asks which type of learning applies, or when you must classify examples in a short answer.

  1. Ask: does the data have correct answers attached? If yes, it is supervised.
  2. If no answers exist and the aim is to find groups or odd cases, it is unsupervised.
  3. If a system acts, gets feedback as reward or penalty and improves, it is reinforcement.
  4. If the question stresses many layers, images, speech or text, name deep learning as well.
  5. Write the answer with the label, a one-line reason and one example.

Common mistakes in Machine Learning and Deep Learning

  • Treating AI, machine learning and deep learning as the same thing.

    News and marketing use the terms loosely.

    Fix: Always state the nesting: deep learning is a subset of ML, which is a subset of AI. Some AI uses fixed rules and no learning.

  • Saying unsupervised learning has no data or no training.

    The word 'unsupervised' sounds like nothing is happening.

    Fix: Say it uses data without labels and finds structure itself.

  • Confusing classification with clustering.

    Both put items into groups.

    Fix: Classification uses known labels from training data. Clustering forms groups with no predefined labels.

  • Describing reinforcement learning as learning from a labelled data set.

    Students link all ML with data sets.

    Fix: Mention the agent, environment, action and reward. Learning comes from feedback, not from labelled examples.

  • Saying deep learning is always better than other ML.

    It is shown as the most advanced method.

    Fix: State that it needs large data and high computing power and is hard to explain. Simpler models may suit small data or where explanation is needed.

  • Writing only definitions with no example or link to the facts.

    Students memorise theory and skip application.

    Fix: Every answer should tie the concept to the case or give one Indian business example.

Worked examples

Example 1

A bank has records of 50,000 past home loans, each marked 'repaid' or 'defaulted'. It wants a system to predict whether a new applicant will default. Identify the type of machine learning and explain how it works.

Show the solution
  1. Check the data: each past loan has a known outcome, so the data is labelled.
  2. Labelled data with a known outcome means supervised learning.
  3. The prediction is a category (default or not), so the task is classification.
  4. The model studies applicant details such as income and repayment history against the known outcomes and learns the pattern.
  5. For a new applicant, it applies the learned pattern to predict the likely outcome.
  6. Note a caution: biased or poor-quality historical data can produce unfair decisions, so the bank should test and review the model.

Answer: This is supervised learning, specifically classification, because the training data carries known labels (repaid or defaulted). The model learns the link between applicant details and outcomes and applies it to new applicants, with care taken over data bias.

Example 2

Distinguish between machine learning and deep learning, with one example of each.

Show the solution
  1. Define ML: systems that learn patterns from data to predict or decide without being given fixed rules for every case.
  2. Define deep learning: a subset of ML that uses neural networks with many hidden layers.
  3. Compare feature handling: in many ML methods people choose the useful features from the data. In deep learning the layers learn features themselves.
  4. Compare data and computing needs: ML can work with smaller data and modest computing. Deep learning usually needs large data and heavy computing.
  5. Compare explainability: simpler ML models are often easier to explain. Deep networks are often seen as black boxes.
  6. Give examples: ML, a model that groups a retailer's customers by buying habits. Deep learning, a system that reads handwritten cheque amounts or recognises speech.

Answer: Machine learning is the wider field of learning from data. Deep learning is a subset using many-layered neural networks that learn features themselves, needing more data and computing power and being harder to explain. Customer segmentation is an ML example. Speech recognition is a deep learning example.

Exam tips

  • Expect definition, distinction and case-identification questions. Practise a two-line definition for each term.
  • Always show the AI, ML, deep learning hierarchy when comparing; it earns quick marks.
  • In case questions, name the learning type first, then justify it from the facts given.
  • Link the topic to risks where you can: bias, explainability and data protection are favourite follow-ups in this paper.
  • Use Indian examples such as UPI fraud detection, credit scoring or retail segmentation.

Practice questions from Artificial Intelligence - Introduction and Basics

Machine Learning and Deep Learning in other exams

The same ground in other exams, if you are preparing for more than one or want another angle on it.

Machine Learning and Deep Learning: frequently asked questions

What is the difference between machine learning and deep learning?

Machine learning is any method where a system learns patterns from data. Deep learning is a type of ML that uses neural networks with many hidden layers. It handles images, speech and text well but needs more data and computing power.

What is the difference between supervised, unsupervised and reinforcement learning?

Supervised learning uses labelled data to predict known types of outputs. Unsupervised learning finds patterns in unlabelled data. Reinforcement learning has an agent that learns by receiving rewards or penalties for its actions.

How does a neural network work in simple terms?

Data enters the input layer and passes through hidden layers, where each unit combines weighted inputs and applies an activation function. The output layer gives the result. The network compares it with the correct answer and adjusts its weights to reduce the error.

Is deep learning the same as AI?

No. AI is the broad goal of machines performing intelligent tasks. Deep learning is one technique within machine learning, which is itself one approach within AI.