Table of Contents

    Chapter Quiz and Knowledge Check

    Machine Learning Fundamentals

    Chapter Quiz and Knowledge Check

    Test your understanding of Machine Learning fundamentals, learning types, workflows, applications, limitations, development tools, data access, environment setup, and responsible practices.

    About This Knowledge Check

    This chapter assessment evaluates whether you can recall important terminology, distinguish related concepts, apply foundational knowledge to practical scenarios, and identify appropriate Machine Learning practices.

    The quiz is intended for self-assessment. Attempt every question before opening the answer and explanation. Record the questions you answer incorrectly and review the corresponding lesson before continuing.

    Assessment principle: The purpose of this quiz is not only to identify correct answers. It is also to help you understand why each incorrect option is unsuitable.

    Instructions

    How to Complete the Quiz

    • Attempt every question without immediately reviewing your notes
    • Select one answer for each multiple-choice question
    • Record your selected option before viewing the explanation
    • Award yourself one point for each correct MCQ answer
    • Do not award partial marks for multiple-choice questions
    • Review why every incorrect option is unsuitable
    • Complete the short-answer and practical sections after the MCQs
    • Revise weak topics before moving to the next chapter
    Assessment Part Purpose Suggested Marking
    Multiple-Choice Questions Tests concept recognition and application One point per correct answer
    Short-Answer Questions Tests explanation in your own words Use the supplied criteria
    Practical Knowledge Check Tests whether you can apply the chapter concepts Complete or needs revision
    Reflection Identifies topics requiring further study Not graded

    Topics Covered

    • Artificial Intelligence, Machine Learning, and Deep Learning
    • Features, targets, models, training, and inference
    • Supervised, unsupervised, and reinforcement learning
    • Classification, regression, clustering, and anomaly detection
    • Machine Learning applications and workflow
    • Advantages, limitations, bias, and human oversight
    • Git and version control for ML projects
    • SQL and relational-data access
    • Python environments, virtual environments, IDEs, GPUs, and Colab
    • Course prerequisites, outcomes, and learning strategy

    Multiple-Choice Questions

    1

    Which statement correctly describes the relationship between Artificial Intelligence, Machine Learning, and Deep Learning?

    1. Deep Learning contains Machine Learning, which contains Artificial Intelligence
    2. Artificial Intelligence contains Machine Learning, which contains Deep Learning
    3. All three terms describe exactly the same field
    4. Machine Learning and Artificial Intelligence are unrelated
    Correct Answer: B

    Artificial Intelligence is the broadest field. Machine Learning is an approach within AI, and Deep Learning is a specialized area within Machine Learning.

    Why A is wrong: It reverses the hierarchy.

    Why C is wrong: The three terms have different scopes and are not interchangeable.

    Why D is wrong: Machine Learning is one of the major approaches used to create AI systems.

    2

    Which statement best defines Machine Learning?

    1. A method for writing every possible decision as a fixed rule
    2. A database technique for storing large datasets
    3. A field in which systems learn patterns from data to perform a task
    4. A hardware technology used only for building faster processors
    Correct Answer: C

    Machine Learning enables systems to learn useful patterns from examples instead of requiring a developer to write an explicit rule for every possible situation.

    Why A is wrong: It describes traditional rule-based programming.

    Why B is wrong: Databases support ML but do not perform learning by definition.

    Why D is wrong: Machine Learning is a software and mathematical discipline, not a processor type.

    3

    In Machine Learning, what is a feature?

    1. The result produced by the trained model
    2. An input variable used by the model
    3. The final model file
    4. The metric used to evaluate the model
    Correct Answer: B

    A feature is an input attribute describing an observation. For a house-price model, size, location, and number of rooms may be features.

    Why A is wrong: That describes a prediction or output.

    Why C is wrong: A model file stores a trained artifact, not one input variable.

    Why D is wrong: A metric measures model performance.

    4

    What is the target in a supervised learning dataset?

    1. The value or category the model is trained to predict
    2. The total number of rows in the dataset
    3. The amount of memory required for training
    4. The programming language used to create the model
    Correct Answer: A

    The target, also called a label in many supervised tasks, is the known outcome the model attempts to predict.

    Why B is wrong: That describes dataset size.

    Why C is wrong: Memory is a computing resource.

    Why D is wrong: The implementation language does not define the prediction target.

    5

    A dataset contains emails labelled as “spam” or “not spam.” Which learning paradigm applies?

    1. Unsupervised Learning
    2. Reinforcement Learning
    3. Supervised Learning
    4. No learning method can use labelled data
    Correct Answer: C

    Every training example has a known output label. The model can therefore learn the relationship between email features and the correct category.

    Why A is wrong: Unsupervised Learning does not require predefined target labels.

    Why B is wrong: Reinforcement Learning uses actions, environmental interaction, and reward feedback.

    Why D is wrong: Labelled data is the defining requirement of supervised learning.

    6

    Which problem is a regression task?

    1. Predicting whether a transaction is suspicious
    2. Predicting the selling price of a house
    3. Grouping customers without predefined categories
    4. Classifying an image as a cat or dog
    Correct Answer: B

    House price is a numerical quantity, so predicting it is a regression problem.

    Why A is wrong: Suspicious or not suspicious is a classification outcome.

    Why C is wrong: Discovering groups without labels is clustering.

    Why D is wrong: Cat or dog is a categorical prediction.

    7

    Which task is a clear example of Unsupervised Learning?

    1. Predicting sales from known historical sales values
    2. Classifying medical images using labelled examples
    3. Grouping customers by purchasing behavior without predefined segments
    4. Predicting whether an employee request will be approved
    Correct Answer: C

    The groups are not defined in advance. The algorithm discovers structure within the customer data.

    Why A is wrong: Known sales outcomes create a supervised forecasting or regression problem.

    Why B is wrong: Labelled examples indicate supervised classification.

    Why D is wrong: A known approval outcome creates a supervised classification problem.

    8

    How does an agent learn in Reinforcement Learning?

    1. By receiving rewards or penalties after actions
    2. By receiving the correct label for every input
    3. By sorting observations alphabetically
    4. By deleting features until only one remains
    Correct Answer: A

    A Reinforcement Learning agent interacts with an environment, selects actions, observes resulting states, and receives reward feedback.

    Why B is wrong: Known labels describe supervised learning.

    Why C is wrong: Sorting is a deterministic programming task.

    Why D is wrong: That is not the learning mechanism of Reinforcement Learning.

    9

    Which statement correctly distinguishes Machine Learning from Deep Learning?

    1. Deep Learning is a subset of Machine Learning based on multi-layer neural networks
    2. Machine Learning can process data, but Deep Learning cannot
    3. Deep Learning is a database-management technique
    4. The terms are completely interchangeable
    Correct Answer: A

    Deep Learning is a specialized branch of Machine Learning that uses neural networks with multiple processing layers.

    Why B is wrong: Deep Learning processes large and complex forms of data.

    Why C is wrong: Deep Learning is a modeling approach, not database management.

    Why D is wrong: Deep Learning has a narrower scope than Machine Learning.

    10

    Which situation is best handled through a fixed rule rather than Machine Learning?

    1. Recognizing objects in photographs
    2. Detecting spam from changing language patterns
    3. Calculating a value using an exact published formula
    4. Recommending films from user behavior
    Correct Answer: C

    An exact formula can be implemented deterministically. A learned approximation would add uncertainty without providing a useful advantage.

    Why A is wrong: Visual recognition contains complex patterns suited to learned models.

    Why B is wrong: Spam patterns are numerous and change over time.

    Why D is wrong: Recommendation commonly depends on patterns learned from interactions.

    11

    What should normally happen first in a Machine Learning workflow?

    1. Deploy the most complex available model
    2. Define the problem, intended use, and success criteria
    3. Generate the final test report
    4. Purchase GPU hardware
    Correct Answer: B

    The problem must be understood before data, algorithms, metrics, or infrastructure can be selected appropriately.

    Why A is wrong: Deployment and model selection occur later.

    Why C is wrong: Evaluation requires a developed model and reserved test data.

    Why D is wrong: Many projects do not require a GPU.

    12

    Why is a baseline important?

    1. It guarantees the final model will be accurate
    2. It provides a simple reference for measuring improvement
    3. It eliminates the need for test data
    4. It automatically finds the best algorithm
    Correct Answer: B

    A baseline shows whether a candidate model provides meaningful improvement over a simple rule, average, common class, or current process.

    Why A is wrong: A reference result cannot guarantee future model quality.

    Why C is wrong: Unseen evaluation data is still required.

    Why D is wrong: Baselines compare performance but do not perform model selection automatically.

    13

    Why must a model be evaluated using unseen data?

    1. Training data can be used only once
    2. Unseen data measures generalization rather than memorization
    3. Models cannot make predictions on training data
    4. Unseen data always produces a higher score
    Correct Answer: B

    The purpose of a model is to perform reliably on new observations. Evaluating only on training examples may reward memorization.

    Why A is wrong: Training data can be read repeatedly.

    Why C is wrong: A fitted model can predict training examples.

    Why D is wrong: Unseen-data performance is often lower than training performance.

    14

    A model performs extremely well on training data but poorly on test data. What is the most likely problem?

    1. Overfitting
    2. Underfitting
    3. Correct generalization
    4. Database normalization
    Correct Answer: A

    Overfitting occurs when a model learns noise or details specific to the training data and fails to generalize.

    Why B is wrong: Underfitting normally produces poor performance on both training and unseen data.

    Why C is wrong: Good generalization requires reliable performance on unseen data.

    Why D is wrong: Database normalization is a database-design concept.

    15

    What is Machine Learning data leakage?

    1. Information unavailable at prediction time improperly influencing training
    2. A dataset file being compressed
    3. A model using too much system memory
    4. A database connection becoming temporarily unavailable
    Correct Answer: A

    Leakage occurs when the model receives information it would not legitimately possess during real prediction. It produces unrealistically strong development results.

    Why B is wrong: Compression is a storage operation.

    Why C is wrong: That describes a computing resource problem.

    Why D is wrong: That is an infrastructure availability problem.

    16

    Which statement correctly describes a model prediction?

    1. It is guaranteed to be true
    2. It is an estimate based on patterns learned from data
    3. It automatically becomes the final business decision
    4. It cannot be questioned after deployment
    Correct Answer: B

    A prediction is an estimate, score, category, forecast, or recommendation based on learned patterns. It may be wrong.

    Why A is wrong: ML results are not guaranteed truth.

    Why C is wrong: Rules, evidence, policies, constraints, and human review may be required.

    Why D is wrong: Model outputs should be reviewable where appropriate.

    17

    A model trained on historically biased decisions may do what?

    1. Automatically remove all historical bias
    2. Refuse to train
    3. Learn and reproduce the biased patterns
    4. Become fair when more similarly biased data is added
    Correct Answer: C

    Models learn patterns represented in their data and labels. Historical unfairness can therefore be reproduced or amplified.

    Why A is wrong: A learning algorithm does not automatically apply ethical judgment.

    Why B is wrong: Most algorithms do not know that a historical pattern is unfair.

    Why D is wrong: More data from the same biased process can reinforce the problem.

    18

    What is the primary purpose of Git?

    1. Increase model-training speed
    2. Track file changes and support collaboration
    3. Store passwords and API keys
    4. Replace every data and model storage system
    Correct Answer: B

    Git records a history of suitable project files and supports review, branching, merging, restoration, and collaboration.

    Why A is wrong: Git does not accelerate numerical training.

    Why C is wrong: Secrets must not be committed to Git.

    Why D is wrong: Large datasets and model artifacts often require separate managed storage.

    19

    What does a Git commit represent?

    1. A recorded snapshot of staged changes
    2. A permanent deletion of the repository
    3. A database transaction
    4. A trained Machine Learning model
    Correct Answer: A

    A commit records selected changes with an identifier, author information, timestamp, and descriptive message.

    Why B is wrong: A commit records history rather than deleting the repository.

    Why C is wrong: Database transactions and Git commits are different concepts.

    Why D is wrong: A commit may reference model code but is not itself the trained model.

    20

    What is the purpose of a Python virtual environment?

    1. Encrypt Python source code
    2. Train models automatically
    3. Isolate a project's package dependencies
    4. Convert Python into a database
    Correct Answer: C

    A virtual environment allows each project to maintain its own package collection without unnecessarily affecting other projects or the system installation.

    Why A is wrong: A virtual environment does not encrypt code.

    Why B is wrong: It manages dependencies, not model-training logic.

    Why D is wrong: It does not change Python into another technology.

    21

    Why should a virtual-environment directory normally be excluded from Git?

    1. It contains generated and environment-specific files that can be recreated
    2. Git cannot store directories
    3. Python refuses to run when Git is installed
    4. It always contains the training target
    Correct Answer: A

    The environment can be recreated from the documented Python version and dependency specification. Committing it adds unnecessary and machine-specific files.

    Why B is wrong: Git tracks files within directories.

    Why C is wrong: Python and Git work together normally.

    Why D is wrong: Targets belong to datasets, not virtual environments by definition.

    22

    Which resource is normally sufficient for Python fundamentals, pandas, and many classical ML exercises?

    1. A CPU environment
    2. A dedicated GPU is always mandatory
    3. A distributed supercomputer is always mandatory
    4. No computing environment is required
    Correct Answer: A

    A CPU is sufficient for foundational programming, data preparation, visualization, and many classical Machine Learning exercises.

    Why B is wrong: A GPU is optional for many workloads.

    Why C is wrong: Foundational work does not require distributed infrastructure.

    Why D is wrong: Code must execute in a computing environment.

    23

    What is the main purpose of SQL in a Machine Learning project?

    1. Design neural-network layers
    2. Retrieve, combine, aggregate, and validate relational data
    3. Replace every Machine Learning library
    4. Provide GPU acceleration
    Correct Answer: B

    SQL is commonly used to obtain and transform structured data stored in relational databases before modeling.

    Why A is wrong: Neural-network design is handled by ML frameworks.

    Why C is wrong: SQL and ML libraries solve different parts of the workflow.

    Why D is wrong: SQL is a data-query language, not a GPU technology.

    24

    Before joining tables to build a training dataset, what should be defined?

    1. The color theme of the notebook
    2. The final row granularity and expected key
    3. The GPU manufacturer
    4. The final model filename
    Correct Answer: B

    Granularity defines what one row represents. Without it, joins can duplicate observations, inflate aggregates, and create an invalid training dataset.

    Why A is wrong: Presentation style does not determine data correctness.

    Why C is wrong: Hardware has no role in join cardinality.

    Why D is wrong: Model naming occurs after the data problem has been defined.

    25

    Which statement best describes a strong Machine Learning learning outcome?

    1. Watch all course lessons
    2. Know about Machine Learning
    3. Understand everything about AI
    4. Build and evaluate a classifier using a labelled dataset
    Correct Answer: D

    A strong learning outcome defines a specific and observable capability that can be demonstrated and assessed.

    Why A is wrong: Watching content measures participation, not capability.

    Why B is wrong: “Know” is too vague to assess directly.

    Why C is wrong: It is overly broad and not measurable.

    Quick Answer Key

    Question Answer Question Answer Question Answer
    1 B 10 C 19 A
    2 C 11 B 20 C
    3 B 12 B 21 A
    4 A 13 B 22 A
    5 C 14 A 23 B
    6 B 15 A 24 B
    7 C 16 B 25 D
    8 A 17 C
    9 A 18 B

    Score Interpretation

    Calculate your multiple-choice percentage using the following formula:

    Quiz Percentage
    \[ \text{Quiz Percentage} = \frac{\text{Correct Answers}}{25} \times 100 \]
    Correct Answers Percentage Interpretation Recommended Action
    23 to 25 92% to 100% Excellent foundation Continue and complete the practical challenge
    20 to 22 80% to 88% Strong understanding Review incorrect answers before continuing
    17 to 19 68% to 76% Working understanding Revise weak competency areas
    13 to 16 52% to 64% Developing foundation Repeat the relevant foundational lessons
    0 to 12 0% to 48% Foundation needs reinforcement Review the chapter systematically and retake the quiz
    Important: A high quiz score demonstrates conceptual recall and application, but practical readiness also requires coding, data, environment, and problem-solving evidence.

    Competency Mapping

    Use the following table to identify the lessons associated with incorrect answers.

    Questions Competency Review Focus
    1, 2, 9 AI, ML, and Deep Learning Definitions, relationships, and scope
    3, 4 Core Terminology Features, targets, predictions, and datasets
    5, 6, 7, 8 Learning Types Supervised, unsupervised, reinforcement, classification, and regression
    10 ML Suitability Machine Learning versus deterministic rules
    11, 12, 13, 14, 15 Machine Learning Workflow Problem definition, baselines, generalization, overfitting, and leakage
    16, 17 Limitations and Responsible Use Uncertainty, bias, human review, and model limitations
    18, 19, 21 Git and Reproducibility Version control, commits, environments, and repository hygiene
    20, 22 Environment Setup Virtual environments, dependency isolation, CPU, and GPU
    23, 24 SQL and Data Access Relational data, aggregation, joins, granularity, and validation
    25 Learning Outcomes Observable and measurable capability

    Short-Answer Knowledge Check

    1

    Explain Machine Learning in your own words.

    A complete answer should mention data, learned patterns, a defined task, and predictions or decisions on new inputs.

    2

    Explain the difference between supervised and unsupervised learning.

    A complete answer should distinguish labelled target data from structure discovery without predefined target labels.

    3

    Explain the difference between classification and regression.

    A complete answer should explain that classification predicts a category while regression predicts a numerical value.

    4

    Explain why a model should be evaluated on unseen data.

    A complete answer should mention generalization, memorization, and realistic performance estimation.

    5

    Describe one example of data leakage.

    A complete answer should identify information that is derived from the target, recorded after the prediction point, or learned from validation or test data.

    6

    Explain why a model prediction is not automatically a final decision.

    A complete answer should mention uncertainty, rules, evidence, policies, constraints, and human oversight.

    7

    Explain how Git supports an ML project.

    A complete answer should mention change history, commits, branches, collaboration, restoration, and reproducibility.

    8

    Explain why SQL result granularity matters.

    A complete answer should define what one row represents and explain how incorrect joins can duplicate observations or inflate aggregates.

    Practical Knowledge Check

    1

    Create a Python Environment

    Create a project directory, create a virtual environment, activate it, install the required packages, and verify the interpreter path.

    • The project directory is clearly named
    • The virtual environment is project-specific
    • The required packages import successfully
    • The interpreter points to the project environment
    • The environment directory is excluded from Git
    2

    Identify an ML Problem

    Select a practical problem and identify its observation, features, target, learning type, prediction point, and expected output.

    3

    Design a Baseline

    Define a simple rule, average, majority class, or current process that can serve as a reference for the proposed model.

    4

    Identify Leakage Risk

    List the available fields and identify any information that would not exist when the real prediction is made.

    5

    Create a Repository Plan

    Decide which source files, configuration files, documentation, datasets, models, environments, and secrets should or should not be committed.

    Practical Readiness Rubric

    Criterion Needs Revision Working Understanding Ready to Continue
    Problem Definition Cannot define the prediction task Defines the task with some ambiguity Clearly defines the user, observation, features, target, and output
    Learning Type Cannot select a suitable learning type Selects the type with limited reasoning Selects and justifies the appropriate learning type
    Workflow Begins with an algorithm or deployment Identifies most workflow stages Connects problem, data, training, evaluation, deployment, and monitoring
    Leakage Prevention Uses future or target-derived information Recognizes obvious leakage Defines prediction time and reviews every feature
    Environment Cannot identify the active interpreter Creates an environment with assistance Creates, verifies, documents, and reproduces the environment
    Responsible Use Treats predictions as guaranteed decisions Recognizes some limitations Documents risks, uncertainty, safeguards, and oversight

    Revision Plan

    1

    List Incorrect Answers

    Record the question numbers and the options you selected.

    2

    Group Errors by Competency

    Use the competency mapping table to identify repeated weaknesses.

    3

    Review the Relevant Lessons

    Focus on the explanation, examples, comparisons, and key takeaway of each weak topic.

    4

    Explain the Concept Without Notes

    Write or speak a short explanation using your own words.

    5

    Create a New Example

    Apply the concept to a different scenario rather than repeating the original question.

    6

    Retake the Quiz

    Attempt the quiz again without looking at the answer key.

    Improvement Cycle
    Attempt → Review → Explain → Apply → Retake

    Learner Reflection

    Reflection Question Your Response
    What was your MCQ score? Complete this field
    Which competency was strongest? Complete this field
    Which competency requires the most revision? Complete this field
    Which incorrect answer surprised you? Complete this field
    Which concept can you now explain confidently? Complete this field
    Which practical task remains difficult? Complete this field
    What will you review before continuing? Complete this field

    Chapter Completion Checklist

    I Am Ready to Continue When

    • I can explain Machine Learning in my own words
    • I can distinguish AI, ML, and Deep Learning
    • I can identify features and targets
    • I can distinguish classification, regression, and clustering
    • I can explain supervised, unsupervised, and reinforcement learning
    • I can outline the Machine Learning workflow
    • I understand baselines, generalization, overfitting, and leakage
    • I understand that model output is not guaranteed truth
    • I can explain how Git supports an ML project
    • I understand the purpose of SQL in ML data preparation
    • I can create and verify a Python virtual environment
    • I understand when CPU, GPU, and Colab environments are appropriate
    • I can identify basic privacy, security, bias, and oversight requirements
    • I have reviewed every incorrect quiz answer
    • I have completed the practical knowledge check

    Key Takeaway

    A strong foundation in Machine Learning means more than remembering definitions. You should be able to distinguish learning types, identify suitable problems, define features and targets, explain the complete workflow, prevent leakage, recognize model limitations, use foundational development tools, and apply responsible practices. Review any weak competency before beginning the next chapter.

    Get Machine Learning updates by email

    Short, practical lessons and course updates from Rumman Ansari. No spam.