Challenge - 5 Problems
Snowflake ML Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of Snowflake ML model training command
What is the output of the following Snowflake SQL command that trains a linear regression model?
Snowflake
CREATE OR REPLACE MODEL my_linear_model OPTIONS (model_type = 'linear_regression', input_label_cols = ('price')) AS SELECT sqft, bedrooms, bathrooms, price FROM housing_data;
Attempts:
2 left
💡 Hint
Check the syntax for CREATE MODEL in Snowflake and required options.
✗ Incorrect
The command correctly creates a linear regression model named my_linear_model using the specified columns. Snowflake supports linear_regression as a model_type and requires input_label_cols to specify the target column.
❓ Model Choice
intermediate1:30remaining
Choosing the correct model type for classification in Snowflake
You want to train a model in Snowflake to predict if a customer will churn (yes/no). Which model_type option should you use in the CREATE MODEL statement?
Attempts:
2 left
💡 Hint
Classification problems with yes/no targets usually use logistic regression.
✗ Incorrect
Logistic regression is used for binary classification tasks like predicting churn (yes/no). Linear regression is for continuous targets, kmeans is for clustering, and time_series_forecast is for forecasting time-based data.
❓ Hyperparameter
advanced2:00remaining
Effect of changing max_iterations in Snowflake model training
In Snowflake's CREATE MODEL statement, what is the effect of increasing the max_iterations option for a logistic regression model?
Attempts:
2 left
💡 Hint
max_iterations controls how many times the algorithm runs through the data.
✗ Incorrect
max_iterations sets the maximum number of optimization steps during training. Increasing it allows the model more chances to improve but takes longer.
❓ Metrics
advanced1:30remaining
Interpreting model evaluation metrics in Snowflake
After training a binary classification model in Snowflake, you get these metrics: accuracy = 0.85, precision = 0.75, recall = 0.60. What does the recall value tell you about the model?
Attempts:
2 left
💡 Hint
Recall measures how many actual positives were found.
✗ Incorrect
Recall is the ratio of true positives found over all actual positives. A recall of 0.60 means the model finds 60% of the positive cases.
🔧 Debug
expert2:30remaining
Debugging Snowflake model training failure due to data type mismatch
You run this command to train a model but get an error: 'Data type mismatch for input_label_cols'. What is the likely cause?
CREATE OR REPLACE MODEL churn_model
OPTIONS (model_type = 'logistic_regression', input_label_cols = ('churn')) AS
SELECT customer_id, churn FROM customer_data;
Attempts:
2 left
💡 Hint
Check the data type of the label column used for training.
✗ Incorrect
Snowflake requires the label column for classification to be numeric or boolean. If 'churn' is stored as text (e.g., 'yes'/'no'), it causes a data type mismatch error.