dc dotCreds
Stanford / DeepLearning.AI Machine Learning Specialization

Stanford Machine Learning Practice Test

Start today's 10-question Stanford Machine Learning set with source-backed explanations, local progress, and a fresh rotation every morning.

10 Free Daily Questions Source-backed Explanations 150 Verified Questions

Questions updated at Aug 12, 2026, 3:38 PM CDT

Go Pro - One Time Unlock

Unlock the full ML Specialization bank

150 verified questions Exam Mode Practice Mode Detailed explanations Weak-area review No subscription - one-time unlock

Get the complete source-backed bank with Interview Questions, the full Study Guide, full Course Notes, detailed explanations, weak-area review, and exam-style practice.

Interview Questions Full Study Guide Full Course Notes Exam Mode Practice Mode Guided Course Detailed explanations Weak-area review No subscription
$4.99 One-time payment
See bundle and PDF options

We will confirm your site email in one quick checkout step.

Why DotCreds?

Practice with explanations that teach.

Source links for every answer Every wrong answer explained Guided Course included Practice and Exam Mode Weak-area tracking Same verified bank across web practice

What you get with free practice

10 Free Questions Daily Fresh set every day from the live bank
Detailed Explanations Learn with clear source-backed answers
Track Your Progress Daily history and performance insights
Upgrade Anytime Unlock the full bank when you are ready
Today's 10 Stanford Machine Learning questions

Use this Stanford Machine Learning practice test to review Machine Learning Specialization. Questions rotate daily and each explanation links to the source used to validate the answer.

Today’s Set
10 questions
Rotates at 10:00 AM local time
Progress
0/10
Answered on this page
Accuracy
0%
Loading countdown…

150 verified questions are in the live bank. Free daily questions are selected from a rotating sample set. Unlock Pro to access the full question bank.

Preparing today’s free questions... Ordering the final locked-bank set before showing the practice cards.
Question 1 of 10
Objective MLS-05 Tree-Based Models

Considering an introductory random forest design, why does an ensemble of trees typically exhibit greater stability compared to a single decision tree?

Concept tested:
Question 2 of 10
Objective MLS-04 Recommender Systems

For a collaborative filtering recommender system, how can a two-tower neural network represent users and items to learn embeddings that capture compatibility?

Concept tested:
Question 3 of 10
Objective MLS-06 Neural Networks and Deep Learning

For a introductory boosting comparison, why do nonlinear activations matter in a neural network?

Concept tested:
Question 4 of 10
Objective MLS-04 Recommender Systems

For a clickstream recommender, what does implicit feedback utilize to quantify user engagement, represented as a numerical score reflecting the strength of the interaction?

Concept tested:
Question 5 of 10
Objective MLS-03 Unsupervised Learning

In the context of anomaly detection with scarce positive examples, why is Gaussian anomaly detection often preferred over supervised classification?

Concept tested:
Question 6 of 10
Objective MLS-05 Tree-Based Models

For a applied one-hot encoding task, what entropy value results from a binary split with probabilities 0.8 and 0.2?

Concept tested:
Question 7 of 10
Objective MLS-01 Supervised Learning

A logistic model outputs probabilities for an anomaly detection system, but a class decision is required. What is the function of a threshold?

Concept tested:
Question 8 of 10
Objective MLS-07 Practical ML Workflow

For a one-hot encoding task, training data distribution differs significantly from the expected deployment data. What potential issue should the team immediately assess?

Concept tested:
Question 9 of 10
Objective MLS-02 Model Selection

During hyperparameter tuning for a neural network, a team observes high variance in the model's performance. What action should they take?

Concept tested:
Question 10 of 10
Objective MLS-01 Supervised Learning

For a review-cycle bias-variance diagnosis, a logistic model outputs probabilities, but the product needs a class decision. What does a threshold do?

Concept tested:
Locked preview

You are viewing today’s free 10. Unlock 140 more questions.

Unlock full bank
Daily sample Rotating practice Free daily questions are selected from a rotating sample set.
Pro bank Full access Unlock Pro to access the full question bank, Exam Mode, Practice Mode, and random tests.
ML Specialization Pro $4.99 one-time

50 Exam Practice Test $1.99 one-time

A 50-question ML Specialization PDF for short review sessions. Questions come first, then the answer review and explanations later in the file.

AI & ML Bundle $9.99 one-time

Unlock all 5 active AI & ML Bundle practice banks in one permanent purchase.

What’s includedNVIDIA GenAI, IBM AI Engineering, TensorFlow Developer, Stanford ML, Databricks ML
All Access $6.99/month

Unlock every active practice exam, bundle and path experience, Pro course and study content, and included downloads.

What’s includedEvery current and future active practice exam, All active bundle and career-path practice content, Pro course lessons, study content, and supported paid downloads

Choose an unlock option to continue. We will confirm your site email in one quick checkout step.

Secure checkout powered by Stripe. Source-backed questions. Not brain dumps. Checkout stays on this page and unlocks the same Pro builder on this practice page.

Purchase options

Unlock the full ML Specialization bank.

Get the full bank, Exam Mode, Practice Mode, question sets, random tests, readiness tracking, saved box scores, and review tools for this exam.

The PDF versions keep questions first and move the answer review, explanations, and distractor notes to the back of the file.

150 verified exam-style questions Every choice explained Exam Mode and Practice Mode Question sets and random tests Readiness score and trends Previous test box scores

You've answered 0/10 questions in today's set.

Locked: 140 more questions in the full bank.

Locked: exam simulation mode, practice mode, readiness tracking, and saved review history.

Checkout stays on this page, so you can keep practicing, unlock the full bank, and start Exam Mode or Practice Mode when you are ready.

Cheat Sheets

7-day score keeper

Answer questions today and this will become a rolling 7-day scorecard.

Local history
Optional progress sync

Keep today’s practice moving

Guest progress saves automatically on this device. Add an email later when you want a magic link that keeps your daily ML Specialization practice in sync across browsers.

Guest progress saves on this device automatically

Guest progress is available without an account.

Official exam resources

Use these official DeepLearning.AI resources alongside the daily practice set. They cover the provider's own exam page, study guide, or prep material.

Need adjacent DeepLearning.AI practice pages too? DeepLearning.AI practice hub.

Source-backed answer review

The free daily Stanford Machine Learning set includes crawlable question text, answer choices, correct answer labels, objective mapping, and source links. Only the first SEO card includes answer explanations and any extra learning features. Pro-only bank questions stay locked; this section mirrors only the 10 free daily questions already shown on this page.

Question 1 Considering an introductory random forest design, why does an ensemble of trees typically exhibit greater stability compared to a single decision tree?

Answer choices

  1. A. Combining many trees can reduce sensitivity to any one tree's mistakes, as the proposed design for the complete governed operational workflow.
  2. B. Ensembles remove the need for evaluation data, for the stated security, delivery, and accountability requirements.
  3. C. A single tree always has higher variance than an ensemble by definition in every case, for the required business outcome.
  4. D. Tree ensembles work only on unlabeled data, for the described technical objective and its associated operational control requirements, for the affected environment.

Correct answer

Combining many trees can reduce sensitivity to any one tree's mistakes, as the proposed design for the complete governed operational workflow.

This item tests a core machine-learning concept. The selected answer, "Combining many trees can reduce sensitivity to any one tree's mistakes", is right because tree methods split data by impurity reduction, and ensembles reduce variance or sequentially correct errors. The other options point to adjacent modeling, evaluation, optimization, or unsupervised-learning ideas rather than the concept required by the stem.

Wrong-answer review

  • B. Ensembles remove the need for evaluation data, for the stated security, delivery, and accountability requirements.: This option handles a neighboring evaluation or preprocessing idea rather than the requested concept.
  • C. A single tree always has higher variance than an ensemble by definition in every case, for the required business outcome.: This option points to a separate optimization, modeling, or data-preparation step.
  • D. Tree ensembles work only on unlabeled data, for the described technical objective and its associated operational control requirements, for the affected environment.: This option follows another ML workflow path rather than the requirement described here.

Extra learning features

Why candidates miss this

The assumption that ensembles obviate evaluation data stems from a misunderstanding of how random forests are built and assessed. While ensembles can improve generalization, they still require a validation set to tune hyperparameters and prevent overfitting. Skipping evaluation would lead to a poorly performing model, as the ensemble’s effectiveness isn't inherent; it’s validated with data, just like individual trees. Likely wrong answer: Ensembles remove the need for evaluation data Review focus: Cross-Validation in Machine Learning

Interview question

Q: Imagine you're building a fraud detection system for an e-commerce platform. You've experimented with a single decision tree, but the performance is inconsistent. How would you improve the model's stability and robustness? Walk me through your thought process, considering the tradeoffs involved. Strong answer: The first thing I'd consider is moving to an ensemble method, specifically a random forest. A single decision tree can be quite sensitive to the specific training data it sees, leading to instability. By combining many trees, each trained on a slightly different subset of the data and features, we can reduce that sensitivity and create a more robust model. The key is that the errors of individual trees tend to cancel each other out. There's a tradeoff, of course; random forests are more computationally expensive to train and deploy than a single tree, and they can be harder to interpret. However, the improved accuracy and stability usually outweigh those costs in a fraud detection scenario where false negatives are very costly.

  • Understanding of ensemble methods
  • Tradeoff analysis (accuracy vs. complexity)
  • Ability to explain the benefit of reducing variance
  • Practical application of a machine learning concept

Caution: Simply stating 'use a random forest' without explaining *why* it's better or the associated tradeoffs. Also, suggesting that ensembles always outperform single trees without acknowledging the computational cost.

Objective/domain: Tree-Based Models

Source: CS229: Machine Learning syllabus

Question 2 For a collaborative filtering recommender system, how can a two-tower neural network represent users and items to learn embeddings that capture compatibility?

Answer choices

  1. A. They are merged into a single extremely long string, and the system uses a decision tree to classify whether the string is positive or negative, under the stated technical, operational, and governance constraints.
  2. B. The movie features are used as weights in the user network, which guarantees that the cost function remains strictly non-convex, for the described technical objective and its associated operational control requirements, within this design.
  3. C. They are compressed using PCA, and recommendations are based on finding which user has the exact same coordinate as the movie in a 1D space, under organization-wide implementation-governance requirements.
  4. D. They are passed through separate neural networks (user tower and movie tower) to output fixed-size embedding vectors, whose dot product represents the predicted compatibility, as described.

Correct answer

They are passed through separate neural networks (user tower and movie tower) to output fixed-size embedding vectors, whose dot product represents the predicted compatibility, as described.

Objective/domain: Recommender Systems

Source: Machine Learning Specialization - Deep Learning for Recommender Systems

Question 3 For a introductory boosting comparison, why do nonlinear activations matter in a neural network?

Answer choices

  1. A. It guarantees the model will never overfit, for the described technical objective and its associated operational control requirements.
  2. B. It allows the network to represent more complex patterns than stacked linear maps alone
  3. C. It removes the need for training data, as the proposed design for the complete governed operational workflow.
  4. D. It converts every task into clustering, under the described neural networks and deep learning criteria.

Correct answer

It allows the network to represent more complex patterns than stacked linear maps alone

Objective/domain: Neural Networks and Deep Learning

Source: CS229 Lecture Notes: Deep Learning

Question 4 For a clickstream recommender, what does implicit feedback utilize to quantify user engagement, represented as a numerical score reflecting the strength of the interaction?

Answer choices

  1. A. Implicit feedback measures user actions like clicks, views, or purchases; it changes the target label y into a binary value (1 for interaction, 0 for no interaction) optimized via binary cross-entropy
  2. B. Implicit feedback relies on survey questions sent via email; it changes y into a fractional score from -1.0 to +1.0 optimized via mean squared error, as the recommended implementation across the complete governed service lifecycle.
  3. C. Implicit feedback uses computer vision to track user eye movements; it changes y into a 2D coordinate vector, for the described technical objective and its associated operational control requirements, for the required outcome.
  4. D. Implicit feedback is when users write long textual reviews; it changes y into a categorical word index, for the described technical objective and its associated operational control requirements, within the proposed design.

Correct answer

Implicit feedback measures user actions like clicks, views, or purchases; it changes the target label y into a binary value (1 for interaction, 0 for no interaction) optimized via binary cross-entropy

Objective/domain: Recommender Systems

Source: Machine Learning Specialization - Recommender Systems Detail

Question 5 In the context of anomaly detection with scarce positive examples, why is Gaussian anomaly detection often preferred over supervised classification?

Answer choices

  1. A. Gaussian anomaly detection automatically generates new synthetic intrusion logs to balance the dataset, for the described technical objective and its associated operational control requirements, under the organization’s defined implementation and exception-management process.
  2. B. Supervised classifiers are mathematically incapable of handling features that have continuous decimal values, for the described technical objective and its associated operational control requirements, for the stated implementation and support requirements.
  3. C. Gaussian models are strictly faster to train because they do not compute any derivatives or parameter updates, for the described technical objective and its associated operational control requirements, for consideration.
  4. D. Supervised classifiers require a much larger number of positive examples to learn the structure of the anomalous class, whereas anomaly detection only needs to model the normal class

Correct answer

Supervised classifiers require a much larger number of positive examples to learn the structure of the anomalous class, whereas anomaly detection only needs to model the normal class

Objective/domain: Unsupervised Learning

Source: Machine Learning Specialization - Anomaly Detection

Question 6 For a applied one-hot encoding task, what entropy value results from a binary split with probabilities 0.8 and 0.2?

Answer choices

  1. A. -0.8 * log2(0.8) + 0.2 * log2(0.2)
  2. B. -0.8 * log2(0.8) - 0.2 * log2(0.2), within the proposed design.
  3. C. -1.0 * log2(1.0) - 0.0 * log2(0.0), for this task.
  4. D. 0.8 * 0.2 * log2(0.8 / 0.2), for the stated tree-based models requirement.

Correct answer

-0.8 * log2(0.8) - 0.2 * log2(0.2), within the proposed design.

Objective/domain: Tree-Based Models

Source: Machine Learning Specialization - Decision Tree Impurity

Question 7 A logistic model outputs probabilities for an anomaly detection system, but a class decision is required. What is the function of a threshold?

Answer choices

  1. A. To maximize the model's accuracy, under the documented operational and governance requirements.
  2. B. To convert predicted probabilities into class labels, within this design.
  3. C. To minimize the training error, for the stated supervised learning requirement.
  4. D. To balance precision and recall, for the required outcome.

Correct answer

To convert predicted probabilities into class labels, within this design.

Objective/domain: Supervised Learning

Source: Machine Learning Specialization

Question 8 For a one-hot encoding task, training data distribution differs significantly from the expected deployment data. What potential issue should the team immediately assess?

Answer choices

  1. A. The number of clusters in k-means, within the stated policy framework.
  2. B. A missing PCA rotation matrix in every model, as described.
  3. C. The impossibility of using validation data, for the required operational result and control objective.
  4. D. Distribution shift between training and deployment data, for the required business outcome.

Correct answer

Distribution shift between training and deployment data, for the required business outcome.

Objective/domain: Practical ML Workflow

Source: CS229: Machine Learning syllabus

Question 9 During hyperparameter tuning for a neural network, a team observes high variance in the model's performance. What action should they take?

Answer choices

  1. A. High bias (underfitting); resolve by adding polynomial features or decreasing lambda, under the documented operational and governance requirements.
  2. B. High bias (underfitting); resolve by collecting more training data or training for more iterations, for the required operational result and control objective.
  3. C. High variance (overfitting); resolve by collecting more training data, reducing the number of features, or increasing lambda
  4. D. Data mismatch; resolve by replacing the validation set with training data, for the described technical objective and its associated operational control requirements, for consideration.

Correct answer

High variance (overfitting); resolve by collecting more training data, reducing the number of features, or increasing lambda

Objective/domain: Model Selection

Source: CS229 Lecture Notes: Regularization and Model Selection

Question 10 For a review-cycle bias-variance diagnosis, a logistic model outputs probabilities, but the product needs a class decision. What does a threshold do?

Answer choices

  1. A. Both training error and validation error immediately flatten out at a high error rate and remain identical, for the affected environment.
  2. B. Apply min-max scaling to compress the anomalous value into the exact center of the Gaussian distribution, under this approach.
  3. C. It converts predicted probabilities into class labels, for the described technical objective and its associated operational control requirements, for the stated scenario.
  4. D. Train six pairwise binary classifiers and use a voting system to determine which category wins the most duels

Correct answer

It converts predicted probabilities into class labels, for the described technical objective and its associated operational control requirements, for the stated scenario.

Objective/domain: Supervised Learning

Source: Machine Learning Specialization

Where to go after the daily web set

How are Stanford Machine Learning questions generated?

dotCreds builds Stanford Machine Learning practice questions from public exam objectives and DeepLearning.AI exam and documentation references. The questions are written for realistic study practice, not copied from exam dumps.

How are explanations sourced?

Each question includes an explanation and, when available, a source link back to the provider documentation or reference used to validate the answer. That keeps the practice tied to study material you can actually review.

What score do I get?

The page tracks today's answered count and accuracy for the 10-question daily set, then saves a 7-day score history on this device so you can see your recent practice trend.

Why use this site?

The site is the fastest way to start Stanford Machine Learning practice without installing anything. It is built for daily recall, quick weak-topic discovery, and source-backed explanations you can review immediately.