Machine Learning Foundations practice questions

From Oracle Cloud Infrastructure 2026 AI Foundations Associate (1Z0-1122-26) (1Z0-1122-26) · 47 questions on this topic

Machine Learning Foundations practice questions from Oracle Cloud Infrastructure 2026 AI Foundations Associate (1Z0-1122-26) (1Z0-1122-26). This pack has 47 questions tagged Machine Learning Foundations, drawn from its timed mock exams. 8 of them are worked through in full below — the question, every option, why each is right or wrong, and the explanation.

Worked examples for Machine Learning Foundations

  1. Question 1

    Before training, a data scientist randomly divides a labeled dataset into a **training set** and a separate **test set**, and the test set is not touched until the model is finished. What is the primary purpose of holding out that test set?

    1. A. To estimate how well the model will perform on new, previously unseen dataCorrect answer

      Correct. The held-out test set stands in for future data. Because the model never saw those rows during training, its score on them is an honest estimate of generalization performance.

    2. B. To give the model additional examples to learn from after the first training pass finishes

      Treats the test set as extra training data. Training on it destroys its independence — the score would then reflect memorization rather than generalization.

    3. C. To reduce the total training time by shrinking the number of rows the algorithm must process

      Confuses an incidental side effect with the purpose. Withholding rows does shrink the training set, but the split exists for honest evaluation; you would simply subsample if speed were the goal.

    4. D. To remove noisy and mislabeled rows from the dataset before the algorithm sees them

      Confuses the train/test split with data cleaning. A random split does not identify or filter bad records; noisy rows are just as likely to land in either partition.

    Explanation

    A model's score on the data it was fitted to is optimistically biased, because the model can reproduce examples it has already absorbed. Reserving a test set that the model never sees during training gives an unbiased estimate of performance on new data, which is the quality that matters in production and the practice Oracle describes for building and testing models. Reusing the test set for training would eliminate that independence; shortening training time is a side effect rather than the goal; and a random partition performs no cleaning or noise removal.

  2. Question 2

    Which TWO tasks are examples of unsupervised learning? (Select all that apply.)

    1. A. Grouping website visitors into segments of similar browsing behavior when no segment definitions exist beforehandCorrect answer

      This is clustering: the algorithm is given unlabeled records and discovers the groupings itself, with no pre-existing category assignments to learn from.

    2. B. Compressing hundreds of correlated sensor readings into a small set of derived features that retain most of the variationCorrect answer

      This is dimensionality reduction, an unsupervised task that finds a lower-dimensional representation of unlabeled data while preserving its structure.

    3. C. Training a model on emails already marked 'spam' or 'not spam' so it can flag new incoming mail

      The marked emails are labels, making this supervised classification; the presence of a known correct output for each training example rules out unsupervised learning.

    4. D. Predicting tomorrow's temperature from a historical archive of daily weather observations and recorded temperatures

      The recorded historical temperatures serve as continuous labels, so this is supervised regression rather than an unsupervised discovery of structure.

    5. E. Tuning a game-playing agent by scoring each match it plays and rewarding winning strategies

      Learning driven by a reward signal from repeated interaction is reinforcement learning; unsupervised learning has no reward and no environment to act in.

    Explanation

    Unsupervised learning operates on data that carries no known outcomes, and its two canonical tasks are clustering — grouping similar records when no groups are predefined — and dimensionality reduction — finding a compact representation that keeps the meaningful variation. Tasks whose training data already pairs inputs with known categories or known numeric values are supervised (classification and regression respectively), and a task driven by reward feedback from repeated interaction with an environment is reinforcement learning, neither of which qualifies.

  3. Question 3

    A retail analytics team has a database of 400,000 past customer transactions. Each record contains customer attributes (age band, tenure, average basket size, region) and a field recorded 90 days later indicating whether that customer churned. The team wants a model that, for a *new* customer record, outputs whether that customer is likely to churn. Which machine learning paradigm does this task represent, and why?

    1. A. Unsupervised learning, because the model must discover customer segments before any prediction can be made

      Applies the unsupervised paradigm where a known target already exists. Segmentation on unlabeled data is a legitimate unsupervised task, but here every historical record already carries the churned/not-churned outcome, so the algorithm can learn the input-to-output mapping directly rather than inferring hidden structure.

    2. B. Supervised learning, because the historical records pair inputs with a known outcome the model learns to predict for unseen inputsCorrect answer

      Correct. Supervised learning trains on labeled examples where each input is paired with the known correct output, and the trained model then predicts that output for new, unseen inputs. The churn flag is the label, and the discrete churn/no-churn target makes this a classification problem.

    3. C. Reinforcement learning, because the model is rewarded each time it correctly identifies a customer who churned

      Picks reinforcement learning for a static labeled dataset. Reinforcement learning involves an agent taking sequential actions in an environment and learning from reward or penalty feedback that its own actions generate; here there is no environment to act in and no action changes the historical data — the correct answers are already recorded.

    4. D. Supervised learning, but specifically regression, because the model estimates a churn value from numeric attributes such as tenure and basket size

      Correctly identifies the paradigm but confuses regression with classification by assuming numeric *inputs* imply a regression task. The task type is determined by the target: a two-category churn/no-churn outcome is classification, whereas regression predicts a continuous numeric quantity.

    Explanation

    The defining characteristic of supervised learning is training on labeled data — historical examples in which each set of input features is paired with the known correct output — so the algorithm can learn the mapping and apply it to new, unseen inputs. A dataset of past transactions carrying a recorded churn outcome is exactly that labeled dataset. Discovering hidden groupings applies when no labels exist, which is not the case here; learning by trial and error from reward signals applies to agents acting in an environment, not to a fixed historical table; and the distinction between regression and classification comes from whether the predicted target is a continuous quantity or a discrete category, not from the data type of the input features.

  4. Question 4

    A hospital has ten years of patient records but no diagnostic conclusions attached to them. Researchers want to find out whether the records fall into previously unrecognized patient subgroups. Which approach should they use, and why?

    1. A. Supervised classification, because patient records always contain an implicit diagnosis that can serve as the label

      Assumes labels can be conjured from unlabeled data. Supervised learning requires an explicit known outcome per record; asserting an 'implicit' label does not supply the training signal.

    2. B. Unsupervised clustering, because the data has no labels and the goal is to discover groupings that are not known in advanceCorrect answer

      The two decisive facts — unlabeled data and a goal of finding structure nobody has defined yet — point directly at clustering, the unsupervised task for grouping similar records.

    3. C. Reinforcement learning, because the researchers can reward the model whenever it proposes an interesting subgroup

      Applies reinforcement learning to static data analysis. Reinforcement learning requires an agent taking sequential actions in an environment; hand-judging outputs after the fact is not a reward-driven interaction loop.

    4. D. Supervised regression, because the model must output a numeric subgroup identifier for each patient

      Mistakes a group identifier for a continuous target and still requires labels the data does not have; regression predicts a meaningful numeric quantity from labeled examples.

    Explanation

    Choosing a paradigm turns on two questions: does the data carry known outcomes, and what is the goal? Here nothing is labeled and the objective is to surface groupings that have never been defined, which is precisely what unsupervised clustering does. Both supervised options fail on the first question because no known outcome exists to train against — and a subgroup identifier is a category, not a continuous quantity — while reinforcement learning fails on the second, since it needs an agent learning from rewards through repeated interaction rather than a fixed archive of records.

  5. Question 5

    A utility company has three years of historical records and wants a model that predicts **how many kilowatt-hours** a household will consume next month, given features such as house size, occupancy, and prior usage. The output must be a continuous numeric quantity. Which algorithm family is the most appropriate starting point?

    1. A. k-means clustering, because it can group similar households and assign each group a usage number

      Algorithm-to-task mismatch: k-means is an unsupervised clustering technique that partitions unlabeled data into groups. It never learns a mapping from features to a labeled numeric target, so it cannot produce a per-household usage prediction.

    2. B. Logistic regression, because it is the regression algorithm designed for numeric outputs

      Misled by the word 'regression' in the name. Despite it, logistic regression is a classification algorithm: it estimates the probability of class membership and is used to assign discrete labels, not to predict an unbounded continuous quantity.

    3. C. Linear regression, because it models a continuous target as a function of the input featuresCorrect answer

      Correct. Linear regression is the canonical supervised algorithm for predicting a continuous numeric value from labeled historical examples, which is exactly what forecasting kilowatt-hours requires.

    4. D. No supervised algorithm applies, because the historical records already contain the answer

      Confuses labeled training data with having nothing left to learn. Historical labels are precisely what supervised learning consumes in order to generalize to future, unseen months.

    Explanation

    Choosing an algorithm family starts with the shape of the target variable. A continuous numeric target learned from labeled history is a supervised regression problem, and linear regression is the baseline algorithm for it, as described in Oracle's overview of supervised learning techniques. Clustering methods such as k-means work on unlabeled data and produce group assignments rather than a numeric prediction; logistic regression, despite its name, outputs class probabilities for discrete categories; and the presence of labeled historical records is the enabling condition for supervised learning, not a reason to avoid it.

  6. Question 6

    A retail analytics team has a table of past property sales with square footage, number of bedrooms, neighborhood, and the final sale price for each record. They want a model that predicts the likely sale price, expressed in dollars, for a newly listed property. Which algorithm family fits this task, and why?

    1. A. K-means clustering, because it groups the historical sales into segments and each segment's label becomes the predicted price.

      Applies an unsupervised algorithm to a supervised task. K-means partitions unlabeled records into groups by similarity and never consumes the known sale prices; its cluster identifiers are arbitrary group tags, not learned numeric predictions.

    2. B. Logistic regression, because despite the name it is the regression algorithm used whenever the predicted output is a continuous number.

      Falls for the misleading name. Logistic regression is a classification algorithm that outputs the probability of membership in a discrete class; it cannot emit an unbounded dollar amount.

    3. C. Linear regression, because the historical records carry a known continuous target value and the required output is a continuous numeric quantity.Correct answer

      Correct. This is supervised learning with a labeled continuous target: the model learns a relationship between the input features and the numeric sale price, then produces a numeric estimate for unseen properties. Predicting a continuous quantity is precisely the regression task.

    4. D. No supervised algorithm applies, because the sale price is a numeric column rather than a category, and supervised learning requires categorical labels.

      Wrongly restricts supervised learning to classification. A label may be either a category or a continuous value; the continuous case is exactly what regression handles.

    Explanation

    Choosing an algorithm family starts from the shape of the available data and the required output. Historical records that already carry the answer make this a supervised problem, and because the answer is a continuous numeric quantity rather than a discrete category, it is a regression problem that linear regression is designed for. Clustering algorithms such as k-means are unsupervised and discard the known labels entirely, logistic regression despite its name predicts class membership rather than an unbounded number, and supervised learning is not restricted to categorical labels — regression is the supervised case for continuous targets.

  7. Question 7

    What distinguishes unsupervised learning from supervised learning?

    1. A. Unsupervised learning always requires more training data than supervised learning to reach usable accuracy

      Treats the difference as a matter of dataset size. Data volume is a practical concern for both paradigms; it is not what separates them.

    2. B. Unsupervised learning runs entirely without algorithms, relying on statistical summaries of the raw data instead

      Mistakes 'no labels' for 'no model.' Unsupervised methods such as clustering and dimensionality reduction are genuine learning algorithms; only the supervision signal is absent.

    3. C. Unsupervised learning requires labeled examples for training but not for evaluation

      Inverts the definition by claiming clustering needs labels to train. If labeled outcomes were available for training, the problem would be a supervised one.

    4. D. Unsupervised learning works on data with no labeled outcomes and discovers structure such as groupings or reduced representations within itCorrect answer

      This is the defining distinction: supervised learning is trained with known input–output pairs, while unsupervised learning is given unlabeled data and finds patterns, groupings, or lower-dimensional structure on its own.

    Explanation

    The dividing line between the two paradigms is the presence of labels. Supervised learning is trained on examples where the desired output is already known, whereas unsupervised learning is handed unlabeled data and must find inherent structure — clusters of similar records, or a compressed set of features that preserves the important variation. Framing the difference as data volume, as the absence of any algorithm, or as a label requirement that applies only at training time all miss that the supervision signal itself is what is missing.

  8. Question 8

    A data science team is deciding which machine learning paradigm fits a new project. What is the defining characteristic of **supervised learning**?

    1. A. It discovers hidden groupings in data for which no correct output has been recorded.

      Describes unsupervised learning; the misconception is swapping the two paradigms — finding structure in unlabeled data is precisely what supervised learning does not do.

    2. B. It learns by taking actions in an environment and adjusting behavior based on rewards and penalties.

      Describes reinforcement learning. Supervised learning has no environment or reward signal — it is corrected directly by known labels, not by delayed feedback.

    3. C. It trains on labeled examples in which each input is paired with its known correct output, so the model learns to map new inputs to that output.Correct answer

      Correct. Supervised learning uses labeled training data — input/known-output pairs — and generalizes that mapping to unseen inputs, which is why it powers regression and classification.

    4. D. It requires no training data at all because the rules are written explicitly by a domain expert.

      Describes a hand-coded rule-based system, not machine learning. The misconception is thinking supervised learning encodes expert rules rather than learning patterns from data.

    Explanation

    Supervised learning is defined by its use of labeled data: every training example carries the known correct answer, and the algorithm learns the mapping from input to that answer so it can predict on new, unlabeled inputs. Finding hidden groupings in data with no known outputs is unsupervised learning, and learning by reward and penalty in an environment is reinforcement learning. Hand-authored expert rules are not machine learning at all, because nothing is learned from data.

Practise all 47 Machine Learning Foundations questions

Oracle Cloud Infrastructure 2026 AI Foundations Associate (1Z0-1122-26) has the full set, inside timed mock exams that mirror real exam conditions — every question with a worked explanation.

Open Oracle Cloud Infrastructure 2026 AI Foundations Associate (1Z0-1122-26)

Other topics in this pack