Snowflake SnowPro Advanced: Data Scientist Certification - DSA-C03 模擬練習

You have trained a classification model in Snowflake using Snowpark ML to predict customer churn. After deploying the model, you observe that the model performs well on the training data but poorly on new, unseen data'. You suspect overfitting. Which of the following strategies can be applied within Snowflake to detect and mitigate overfitting during model validation , considering the model is already deployed and receiving inference requests through a Snowflake UDF?

正解: C,D
解説: (PassTest メンバーにのみ表示されます)
You are tasked with building a predictive model in Snowflake to identify high-value customers based on their transaction history. The 'CUSTOMER_TRANSACTIONS table contains a 'TRANSACTION_AMOUNT column. You need to binarize this column, categorizing transactions as 'High Value' if the amount is above a dynamically calculated threshold (the 90th percentile of transaction amounts) and 'Low Value' otherwise. Which of the following Snowflake SQL queries correctly achieves this binarization, leveraging window functions for threshold calculation and resulting in a 'CUSTOMER SEGMENT column?

正解: A,B,D
解説: (PassTest メンバーにのみ表示されます)
You are managing a machine learning model lifecycle in Snowflake using the Model Registry. Which of the following statements are true regarding model lineage and governance when utilizing the Model Registry for model versioning and deployment?

正解: B,D,E
解説: (PassTest メンバーにのみ表示されます)
A marketing team uses Snowflake to store customer purchase data'. They want to segment customers based on their spending habits using a derived feature called The 'PURCHASES' table has columns 'customer id' (IN T), 'purchase_date' (DATE), and 'purchase_amount' (NUMBER). The team needs a way to handle situations where a customer might have missing months (no purchases in a particular month). They want to impute a 0 spend for those months before calculating the average. Which approach provides the most accurate and robust calculation, especially when considering users with sparse purchase history?

正解: C
解説: (PassTest メンバーにのみ表示されます)
Consider the following Snowflake SQL query used to calculate the RMSE for a regression model's predictions, where 'actual_value' is the actual value and 'predicted value' is the model's prediction. However, you notice that the RMSE calculation is incorrect due to an error in the query. Identify the error in the query and provide the corrected query. The table name is 'sales_predictions'.

Which of the following options represents the corrected query that accurately calculates the RMSE?

正解: E
解説: (PassTest メンバーにのみ表示されます)
You're building a model to predict whether a user will click on an ad (binary classification: click or no-click) using Snowflake. The data is structured and includes features like user demographics, ad characteristics, and past user interactions. You've trained a logistic regression model using SNOWFLAKE.ML and are now evaluating its performance. You notice that while the overall accuracy is high (around 95%), the model performs poorly at predicting clicks (low recall for the 'click' class). Which of the following steps could you take to diagnose the issue and improve the model's ability to predict clicks, and how would you implement them using Snowflake SQL? SELECT ALL THAT APPLY.

正解: A,B,D
解説: (PassTest メンバーにのみ表示されます)
You are developing a data transformation pipeline in Python that reads data from Snowflake, performs complex operations using Pandas DataFrames, and writes the transformed data back to Snowflake. You've implemented a function, 'transform data(df)', which processes a Pandas DataFrame. You want to leverage Snowflake's compute resources for the DataFrame operations as much as possible, even for intermediate transformations before loading the final result. Which of the following strategies could you employ to optimize this process, assuming you have a configured Snowflake connection "conn"?

正解: C
解説: (PassTest メンバーにのみ表示されます)
You're working with a large dataset containing customer purchase history. You want to identify customers whose purchase frequency deviates significantly from the average purchase frequency of all customers. The dataset is in a table named 'purchase history' with columns 'customer id' and 'purchase date'. What combination of Snowflake functionalities will allow you to achieve this task efficiently?
Choose all that apply.

正解: B,D
解説: (PassTest メンバーにのみ表示されます)
You have built an external function to train a PyTorch model using SageMaker. The model training process requires a significant amount of CPU and memory. The training data is passed from Snowflake to the external function in batches. The external function code in AWS Lambda is as follows:

The Snowflake external function is defined as follows:

During testing, you encounter '500 Internal Server Error' from the external function consistently. Upon inspection of the Lambda logs, you find messages indicating 'PayloadTooLargeError'. What is the most likely cause and how do you mitigate it within the context of Snowflake and AWS Lambda?

正解: E
解説: (PassTest メンバーにのみ表示されます)
A data scientist is building a model in Snowflake to predict customer churn. They have a dataset with features like 'age', 'monthly_spend', 'contract_length', and 'complaints'. The target variable is 'churned' (0 or 1). They decide to use a Logistic Regression model. However, initial performance is poor. Which of the following actions could MOST effectively improve the model's performance, considering best practices for Supervised Learning in a Snowflake environment focused on scalable and robust deployment?

正解: B
解説: (PassTest メンバーにのみ表示されます)
You are developing a real-time fraud detection system using Snowpark and deploying it as a Streamlit application connected to Snowflake. The system ingests transaction data continuously and applies a pre-trained machine learning model (stored as a binary file in Snowflake's internal stage) to score each transaction for fraud. You need to ensure the model loading process is efficient, and you're aiming to optimize performance by only loading the model once when the application starts, not for every single transaction. Which combination of approaches will BEST achieve this in a reliable and efficient manner, considering the Streamlit application's lifecycle and potential concurrency issues?

正解: B
解説: (PassTest メンバーにのみ表示されます)