CertSafari
    Snowflake SnowPro Advanced: Data Scientist (DSA-C03)· Lessons

    Domain 1 · Lesson 1/16

    Supervised, unsupervised and reinforcement learning

    Define machine learning concepts for data science workloads.

    15 min read
    4.25% of exam
    6 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Decide whether a data science workload is supervised or unsupervised by asking whether each training row already holds the answer
    • Pick an estimator whose type matches the label: a regressor for a continuous number, a classifier for a set of classes
    • Tell a model's learned parameters apart from the configuration you choose before training
    • Recognise unsupervised workloads such as clustering and unlabelled outlier detection, and prepare features for distance-based clustering
    • Explain how reinforcement learning differs from the other two, and why a table of past outcomes is not a reward signal

    Key concept

    Labelled vs unlabelled training rows — Supervised learning trains on rows that already hold the answer in a target column, so its predictions can be checked against that answer. Unsupervised learning gets no answer column and has to find structure, such as groups or outliers, by itself.

    1.Labelled rows mean supervised learning

    One question sorts most machine learning workloads: does each training row already have the answer? If it does, the answer sits in a target column, also called the label, and the workload is supervised. The model learns how the feature columns map to that label. It then predicts the label for new rows where nobody knows the answer yet. Customer churn, credit card fraud and spam are the standard examples. Each has a history in which the outcome was eventually recorded for every row.

    Snowflake's classification function shows the pattern clearly. A suitable training set has a target column with the labeled class of every row and at least one feature column. You name that column when you create the model. In the example below, label is a Boolean that records whether a user went on to purchase, and user_interest_score and user_rating are the features.

    Training a supervised classifier: TARGET_COLNAME names the column that holds the known answer for every rowsql
    CREATE OR REPLACE SNOWFLAKE.ML.CLASSIFICATION model_binary(
        INPUT_DATA => SYSTEM$REFERENCE('view', 'binary_classification_view'),
        TARGET_COLNAME => 'label'
    );

    Once trained, the model's PREDICT method fills in labels for a second table that has the same features but no label column. The labels are also what make a supervised model measurable. To evaluate it, Snowflake trains an additional model with some labelled rows withheld. It then predicts those rows and compares the predicted classes with the actual ones. No comparison like this exists without a label to compare against.

    The rule depends on how the history was recorded, not on how the business problem is phrased. Take a churn table where a CHURNED flag was filled in 90 days after every account closed or renewed. Every row carries its outcome. That makes it a plain supervised classification problem, so nothing has to be pseudo-labelled, and no semi-supervised workaround is needed. Clustering the same customers would give you groups, but not a churn probability. Groups found without the label never learned what churn looks like.

    Checkpoint 1 of 7· Fill the gap

    This statement trains a supervised binary classifier on binary_classification_view, which has the columns user_interest_score, user_rating and label. Which column belongs in the blank?

    CREATE OR REPLACE SNOWFLAKE.ML.CLASSIFICATION model_binary(
        INPUT_DATA => SYSTEM$REFERENCE('view', 'binary_classification_view'),
        TARGET_COLNAME => ' ? '
    );

    Checkpoint 2 of 7· Exam question

    A telecom provider keeps three years of customer records in Snowflake. A CHURNED column was filled in 90 days after each account closed or renewed. The team wants a model that scores today's active customers by cancellation risk. Which learning paradigm fits MOST directly?

    Sources1

    2.What training learns and what you choose

    Training a model fits its parameters to the data: the coefficients of a linear model, the weights of a neural network, the split points of a tree. They are outputs, not settings. Snowflake's classification function says so outright: the model is fitted to the training data you provide, and its model parameters can't be specified or adjusted by hand. The function is powered by a gradient boosting machine, and you can't choose or change that algorithm either. What you do control is the configuration: which data goes in, which column is the target, and, in Python libraries, which estimator to use and any hyperparameters set before fitting.

    The difference has a practical result. A trained model is its parameters, and those parameters came from one specific dataset. So when the data changes, you don't edit the model. Classification and anomaly detection models are immutable: to update one, you drop it and train a new one, usually with CREATE OR REPLACE.

    The type of the label decides which supervised estimator to configure. When the target is a category such as purchase or no purchase, you need a classifier. Classification only makes sense when the label's cardinality is greater than one and less than the number of rows, and Snowflake's function caps it at 255 distinct classes. A duration in minutes breaks that idea: nearly every row would become its own class, and two adjacent minutes would count as completely different answers. A continuous number calls for a regressor. In snowflake.ml.modeling, the label is passed in the same way for both: label_cols names the answer column and input_cols names the features.

    A supervised regressor in snowflake.ml.modeling: label_cols points at a continuous target, and fit() learns the parameterspython
    from snowflake.ml.modeling.xgboost import XGBRegressor
    
    regressor = XGBRegressor(
        input_cols=feature_columns,
        label_cols=["ETA_MINUTES"],
        output_cols=["predicted_eta"]
    )
    regressor.fit(train_df)

    Unsupervised tools don't fit this task, however you configure them. KMeans and PCA never receive the label column, so nothing they learn is tuned to predict minutes. A cluster's average or a first principal component is a summary of the features, not a fitted prediction of the target.

    Configuration you choose compared with parameters that training learns
    ItemChosen before training or learned?Example
    Target columnChosenTARGET_COLNAME => 'label', label_cols=["ETA_MINUTES"]
    Feature columnsChoseninput_cols=feature_columns
    Estimator or algorithmChosen in Python libraries; fixed in the classification functionXGBRegressor, XGBClassifier; gradient boosting machine
    Model parametersLearned by fit / CREATECan't be set by hand in the classification function

    Checkpoint 3 of 7· Check yourself

    A churn model built with SNOWFLAKE.ML.CLASSIFICATION was trained last quarter. A new quarter of labelled rows has arrived, and the team wants the model to reflect it and predict better. Which approach works?

    Checkpoint 4 of 7· Exam question

    A data scientist must predict the number of minutes each food delivery will take, using a labeled Snowflake table with distance, courier load and weather columns. Which snowflake.ml.modeling estimator choice is MOST appropriate for this target?

    Sources123

    3.Unlabelled rows mean unsupervised learning

    When no column holds the answer, the model has to find structure by itself, and the workload is unsupervised. Two shapes come up most often. Clustering groups similar rows. Outlier detection flags the rows that don't fit the pattern. Both are answers to "what is in this data?" rather than "what is the value of this known target?"

    Customer segmentation is the classic clustering case. A retailer with two million loyalty-card customers and no segment labels wants natural groups based on purchase frequency, basket size and recency. A Snowpark ML KMeans model fits that task. Before fitting, the features need to be put on a common scale. One of the Snowflake guides scales its inputs with min-max scaling before KMeans, and snowflake.ml.modeling.preprocessing provides StandardScaler for the same job. Here is why: KMeans groups rows by distance. If you leave basket size in raw currency next to a visit count in single digits, basket size alone decides which rows sit close together. The scaler is fitted too, because it captures the global state of the training sample, such as each column's minimum and maximum.

    With no labels, you can't score clusters as right or wrong. You compare candidate numbers of clusters with internal measures instead. The main ones are inertia, also called the within-cluster sum of squares, and the silhouette score, and you fit several values of k and compare them. Reusing an existing column as the answer quietly changes the paradigm. If you train on a loyalty tier, or on a "top-spending decile" flag, you get a supervised model of that column. It reproduces groups someone already defined; it doesn't discover new ones.

    Outlier detection is unsupervised in its default form. Snowflake's anomaly detection function trains on a timestamp column and a target metric. With no label, it learns what normal looks like, forecasts the period it is checking, and flags the values that fall away from that forecast. Mean and median react differently to such values, as Normal vs skewed distributions; mean vs median under outliers explains. Finding the unusual points when nobody has marked them is the unsupervised part.

    Unsupervised anomaly detection: an empty LABEL_COLNAME means no row is marked as a known anomalysql
    CREATE OR REPLACE SNOWFLAKE.ML.ANOMALY_DETECTION basic_model( INPUT_DATA => TABLE(view_with_training_data), TIMESTAMP_COLNAME => 'date', TARGET_COLNAME => 'sales', LABEL_COLNAME => '');

    The same function also supports a supervised, labelled approach. If you name a label column that marks the rows already known to be anomalies, the training becomes supervised. Calling a task "anomaly detection" doesn't fix its paradigm. The presence of labels does.

    Checkpoint 5 of 7· Check yourself

    Your daily compute-cost history has an IS_INCIDENT column. It marks the days that analysts later confirmed as anomalies. You pass that column as LABEL_COLNAME when you create a SNOWFLAKE.ML.ANOMALY_DETECTION model. What kind of training is this?

    Checkpoint 6 of 7· Exam question

    A retailer has no labeled segments for 2 million loyalty-card customers. Marketing wants natural groups based on purchase frequency, basket size and recency, with all three features on very different numeric scales. Which approach is MOST appropriate?

    Sources345

    4.Rewards instead of rows: reinforcement learning

    Reinforcement learning drops the training table altogether. An agent takes actions in an environment, receives a reward or a penalty after each one, and gradually learns a policy that earns more reward. Nobody hands it the correct action for a situation, which is how it differs from supervised learning. It isn't just looking for structure in a fixed dataset either, which is how it differs from unsupervised learning. It learns from the consequences of its own choices, so it needs a loop in which those choices change what happens next.

    Snowflake's ML Functions all follow the table-in, prediction-out pattern. Forecasting predicts future metric values from past trends. Anomaly Detection flags values that differ from expectations. Classification sorts rows into classes. Top Insights finds dimensions that affect a metric in surprising ways. Each one trains on historical rows and returns predictions or insights. None of them takes an action and learns from a reward, and Snowflake ML has no dedicated reinforcement learning feature.

    A history table full of outcomes can look like rewards, but it isn't. Suppose retention offers went out in the past and the cancellations that followed were recorded. That table is labelled data: each row pairs features with a known result, and a model learns from it by supervised training. Reinforcement learning would need the model itself to choose offers, see the response, and adjust. Past outcomes that someone else's decisions produced don't give it that loop.

    The three paradigms by what the training data contains
    ParadigmWhat the model learns fromCan it be scored against a known answer?Snowflake example
    SupervisedRows with a target column (label)Yes, by comparing predictions with actual labels on withheld rowsSNOWFLAKE.ML.CLASSIFICATION with TARGET_COLNAME
    UnsupervisedRows with no answer columnNo; judged by internal measures such as within-cluster sum of squaresKMeans; ANOMALY_DETECTION with LABEL_COLNAME => ''
    ReinforcementRewards for actions an agent takesNo fixed answer; judged by the reward earnedNo ML Function takes actions or learns from rewards

    Checkpoint 7 of 7· Check yourself

    Last year a telecom sent retention offers to some subscribers. For each one, it recorded whether that subscriber cancelled within 60 days. The team now wants to predict which subscribers will cancel. Which approach fits this data?

    Sources6

    Sources

    (6)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Common use cases of classification include customer churn prediction, credit card fraud detection, and spam detection.”
      ↩︎ Labelled rows mean supervised learning
      “a target column representing the labeled class of each data point”
      ↩︎ Labelled rows mean supervised learning
      “use its PREDICT method to infer labels for the unlabeled purchase data”
      ↩︎ Labelled rows mean supervised learning
      “the predicted classes are compared to the actual classes”
      ↩︎ Labelled rows mean supervised learning
      “The model is fitted to the provided training data.”
      ↩︎ What training learns and what you choose
      “You cannot choose or modify the classification algorithm.”
      ↩︎ What training learns and what you choose
      “Models are immutable and cannot be updated in place.”
      ↩︎ What training learns and what you choose
      “The cardinality of the label (target) column must be greater than one and less than the number of rows in the dataset.”
      ↩︎ What training learns and what you choose
      “a target column representing the labeled class of each data point”
      ↩︎ Key concept
      “Model parameters cannot be manually specified or adjusted.”
      ↩︎ Exam trap 3
      “Your target column must contain no more than 255 distinct classes.”
      ↩︎ Prediction
      “Models are immutable and cannot be updated in place. To update a model, drop the existing model and train a new one.”
      ↩︎ Checkpoint
      “Suitable training datasets for use with classification include a target column representing the labeled class of each data point and at least one feature column.”
      ↩︎ Checkpoint
    2. 2.
      “input_cols=input_cols, output_cols=output_cols, label_cols=label_cols, drop_input_cols=True”
      ↩︎ What training learns and what you choose
    3. 3.
      “used in combination with different sets of model hyper-parameters”
      ↩︎ What training learns and what you choose
      “scale our input variables using min-max scaling”
      ↩︎ Unlabelled rows mean unsupervised learning
      “they capture the global state (e.g. minimum and maximum values for columns) of our training sample”
      ↩︎ Unlabelled rows mean unsupervised learning
      “Within-Cluster Sum of Squares”
      ↩︎ Unlabelled rows mean unsupervised learning
    4. 4.
      “Snowflake ML preprocessors handle distributed transformations directly within Snowflake.”
      ↩︎ Unlabelled rows mean unsupervised learning
      “The following code uses the StandardScaler and OneHotEncoder libraries.”
      ↩︎ Exam trap 4
    5. 5.
      “Anomaly detection is the process of identifying outliers in data.”
      ↩︎ Unlabelled rows mean unsupervised learning
      “with a supervised (labeled) approach”
      ↩︎ Unlabelled rows mean unsupervised learning
      “The purpose of the label column is to tell the model which rows are known anomalies.”
      ↩︎ Exam trap 1
      “Because this example uses unsupervised training, you do not need to use the label column.”
      ↩︎ Prediction
      “The purpose of the label column is to tell the model which rows are known anomalies.”
      ↩︎ Checkpoint
    6. 6.
      “Forecasting predicts future metric values from past trends in time-series data.”
      ↩︎ Rewards instead of rows: reinforcement learning
      “Anomaly Detection flags metric values that differ from typical expectations.”
      ↩︎ Rewards instead of rows: reinforcement learning
      “Top Insights helps you find dimensions and values that affect the metric in surprising ways.”
      ↩︎ Rewards instead of rows: reinforcement learning
      “Classification sort rows into two or more classes based on their most predictive features.”
      ↩︎ Exam trap 2

    Ready to test yourself?

    Practise the 16 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.