0
0
Snowflakecloud~20 mins

ML model training in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Snowflake ML Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2: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;
AModel my_linear_model created successfully with linear_regression type.
BModel training failed due to missing input_label_cols option.
CError: Model type linear_regression not supported in Snowflake.
DSyntax error: Missing FROM clause in SELECT statement.
Attempts:
2 left
💡 Hint
Check the syntax for CREATE MODEL in Snowflake and required options.
Model Choice
intermediate
1: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?
A'time_series_forecast'
B'kmeans'
C'linear_regression'
D'logistic_regression'
Attempts:
2 left
💡 Hint
Classification problems with yes/no targets usually use logistic regression.
Hyperparameter
advanced
2: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?
AIt decreases the training time by limiting the number of features used.
BIt increases the number of training cycles, potentially improving model accuracy but increasing training time.
CIt changes the learning rate to speed up convergence.
DIt automatically selects the best regularization parameter.
Attempts:
2 left
💡 Hint
max_iterations controls how many times the algorithm runs through the data.
Metrics
advanced
1: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?
AThe model correctly identifies 60% of all actual positive cases.
BThe model correctly predicts 75% of its positive predictions.
CThe model is 85% accurate overall on the test data.
DThe model has 60% accuracy on negative cases.
Attempts:
2 left
💡 Hint
Recall measures how many actual positives were found.
🔧 Debug
expert
2: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;
AThe input_label_cols option should be a list of multiple columns.
BThe model_type 'logistic_regression' is not supported for this data.
CThe 'churn' column is not numeric or boolean, but a string type.
DThe SELECT statement is missing required feature columns besides customer_id and churn.
Attempts:
2 left
💡 Hint
Check the data type of the label column used for training.