Question 1
Multiple choice
Which ones are the known limitations of using External function? Choose all apply.
-
A
Currently, external functions cannot be shared with data consumers via Secure Data Sharing.
-
B
Currently, external functions must be scalar functions. A scalar external function re-turns a single value for each input row.
-
C
External functions have more overhead than internal functions (both built-in functions and internal UDFs) and usually execute more slowly
-
D
An external function accessed through an AWS API Gateway private endpoint can be accessed only from a Snowflake VPC (Virtual Private Cloud) on AWS and in the same AWS region.
Reveal answer details
Close answer details
Correct answersA, B, C, D
Which of the following metrics are used to evaluate classification models?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationExplanation: Evaluation metrics are tied to machine learning tasks. There are different metrics for the tasks of classification and regression. Some metrics, like precision-recall, are useful for multiple tasks. Classification and regression are examples of supervised learning, which constitutes a majority of machine learning applications. Using different metrics for performance evaluation, we should be able to im-prove our model's overall predictive power before we roll it out for production on unseen data. Without doing a proper evaluation of the Machine Learning model by using different evaluation metrics, and only depending on accuracy, can lead to a problemwhen the respective model is deployed on unseen data and may end in poor predictions. Classification metrics are evaluation measures used to assess the performance of a classification model. Common metrics include accuracy (proportion of correct predictions), precision (true positives over total predicted positives), recall (true positives over total actual positives), F1 score (har-monic mean of precision and recall), and area under the receiver operating characteristic curve (AUC-ROC). Confusion Matrix Confusion Matrix is a performance measurement for the machine learning classification problems where the output can be two or more classes. It is a table with combinations of predicted and actual values. It is extremely useful for measuring the Recall, Precision, Accuracy, and AUC-ROC curves. The four commonly used metrics for evaluating classifier performance are: 1. Accuracy: The proportion of correct predictions out of the total predictions. 2. Precision: The proportion of true positive predictions out of the total positive predictions (precision = true positives / (true positives + false positives)). 3. Recall (Sensitivity or True Positive Rate): The proportion of true positive predictions out of the total actual positive instances (recall = true positives / (true positives + false negatives)). 4. F1 Score: The harmonic mean of precision and recall, providing a balance between the two metrics (F1 score = 2 * ((precision * recall) / (precision + recall))). These metrics help assess the classifier's effectiveness in correctly classifying instances of different classes. Understanding how well a machine learning model will perform on unseen data is the main purpose behind working with these evaluation metrics. Metrics like accuracy, precision, recall are good ways to evaluate classification models for balanced datasets, but if the data is imbalanced then other methods like ROC/ AUC perform better in evaluating the model performance. ROC curve isn't just a single number but it's a whole curve that provides nuanced details about the behavior of the classifier. It is also hard to quickly compare many ROC curves to each other.
Which metric is not used for evaluating classification models?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationExplanation: The four commonly used metrics for evaluating classifier performance are: 1. Accuracy: The proportion of correct predictions out of the total predictions. 2. Precision: The proportion of true positive predictions out of the total positive predictions (precision = true positives / (true positives + false positives)). 3. Recall (Sensitivity or True Positive Rate): The proportion of true positive predictions out of the total actual positive instances (recall = true positives / (true positives + false negatives)). 4. F1 Score: The harmonic mean of precision and recall, providing a balance between the two metrics (F1 score = 2 * ((precision * recall) / (precision + recall))). Root Mean Squared Error (RMSE)and Mean Absolute Error (MAE) are metrics used to evaluate a Regression Model. These metrics tell us how accurate our predictions are and, what is the amount of deviation from the actual values.
Which of the following is a Python-based web application framework for visualizing data and analyzing results in a more efficient and flexible way?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationExplanation: Streamlit is a Python-based web application framework for visualizing data and analyzing results in a more efficient and flexible way. It is an open source library that assists data scientists and academics to develop Machine Learning (ML) visualization dashboards in a short period of time. We can build and deploy powerful data applications with just a few lines of code. Why Streamlit? Currently, real-world applications are in high demand and developers are developing new libraries and frameworks to make on-the-go dashboards easier to build and deploy. Streamlit is a library that reduces your dashboard development time from days to hours. Following are some reasons to choose the Streamlit: It is a free and open-source library. Installing Streamlit is as simple as installing any other python package It is easy to learn because you won't need any web development experience, only a basic under-standing of Python is enough to build a data application. It is compatible with almost all machine learning frameworks, including Tensorflow and Pytorch, Scikit-learn, and visualization libraries such as Seaborn, Altair, Plotly, and many others.
Question 5
Multiple choice
Which of the Following is not type of Windows function in Snowflake? Choose 2.
-
A
-
B
-
C
Aggregation window functions.
-
D
Reveal answer details
Close answer details
Correct answersC, D
ExplanationExplanation: Window Functions A window function operates on a group ("window") of related rows. Each time a window function is called, it is passed a row (the current row in the window) and the window of rows that contain the current row. The window function returns one output row for each input row. The output depends on the individual row passed to the function and the values of the other rows in the window passed to the function. Some window functions are order-sensitive. There are two main types of order-sensitive window functions: Rank-related functions. Window frame functions. Rank-related functions list information based on the "rank" of a row. For example, if you rank stores in descending order by profit per year, the store with the most profit will be ranked 1; the second-most profitable store will be ranked 2, etc. Window frame functions allow you to perform rolling operations, such as calculating a running total or a moving average, on a subset of the rows in the window.
The most widely used metrics and tools to assess a classification model are:
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 7
Multiple choice
Which ones are the key actions in the data collection phase of Machine learning included? Choose 2.
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answersA, B
ExplanationExplanation: The key actions in the data collection phase include: Label: Labeled data is the raw data that was processed by adding one or more meaningful tags so that a model can learn from it. It will take some work to label it if such information is missing (manually or automatically). Ingest and Aggregate: Incorporating and combining data from many data sources is part of data collection in AI. Data collection Collecting data for training the ML model is the basic step in the machine learning pipeline. The predictions made by ML systems can only be as good as the data on which they have been trained. Following are some of the problems that can arise in data collection: Inaccurate data. The collected data could be unrelated to the problem statement. Missing data. Sub-data could be missing. That could take the form of empty values in columns or missing images for some class of prediction. Data imbalance. Some classes or categories in the data may have a disproportionately high or low number of corresponding samples. As a result, they risk being under-represented in the model. Data bias. Depending on how the data, subjects and labels themselves are chosen, the model could propagate inherent biases on gender, politics, age or region, for example. Data bias is difficult to detect and remove. Several techniques can be applied to address those problems: Pre-cleaned, freely available datasets. If the problem statement (for example, image classification, object recognition) aligns with a clean, pre-existing, properly formulated dataset, then take ad-vantage of existing, open-source expertise. Web crawling and scraping. Automated tools, bots and headless browsers can crawl and scrape websites for data. Private data. ML engineers can create their own data. This is helpful when the amount of data required to train the model is small and the problem statement is too specific to generalize over an open-source dataset. Custom data. Agencies can create or crowdsource the data for a fee.
Question 8
Multiple choice
Select the Correct Statements regarding Normalization? Choose 2.
-
A
Normalization technique uses minimum and max values for scaling of model.
-
B
Normalization technique uses mean and standard deviation for scaling of model.
-
C
Scikit-Learn provides a transformer RecommendedScaler for Normalization.
-
D
Normalization got affected by outliers.
Reveal answer details
Close answer details
Correct answersA, D
ExplanationExplanation: Normalization is a scaling technique in Machine Learning applied during data preparation to change the values of numeric columns in the dataset to use a common scale.It is not necessary for all datasets in a model. It is required only when features of machine learning models have different ranges. Scikit-Learn provides a transformer called MinMaxScaler for Normalization. This technique uses minimum and max values for scaling of model.Itis useful when feature distribution is unknown.It got affected by outliers.
Which one of the following is not the key component while designing External functions within Snowflake?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationExplanation: What is an External Function? An external function calls code that is executed outside Snowflake. The remotely executed code is known as a remote service. Information sent to a remote service is usually relayed through a proxy service. Snowflake stores security-related external function information in an API integration. External Function: An external function is a type of UDF. Unlike other UDFs, an external function does not contain its own code; instead, the external function calls code that is stored and executed outside Snowflake. Inside Snowflake, the external function is stored as a database object that contains information that Snowflake uses to call the remote service. This stored information includes the URL of the proxy service that relays information to and from the remote service. Remote Service: The remotely executed code is known as a remote service. The remote service must act like a function. For example, it must return a value. Snowflake supports scalar external functions; the remote service must return exactly one row for each row received. Proxy Service: Snowflake does not call a remote service directly. Instead, Snowflake calls a proxy service, which relays the data to the remote service. The proxy service can increase security by authenticating requests to the remote service. The proxy service can support subscription-based billing for a remote service. For example, the proxy service can verify that a caller to the remote service is a paid subscriber. The proxy service also relays the response from the remote service back to Snowflake. Examples of proxy services include: Amazon API Gateway. Microsoft Azure API Management service. API Integration: An integration is a Snowflake object that provides an interface between Snowflake and third-party services. An API integration stores information, such as security information, that is needed to work with a proxy service or remote service. An API integration is created with the CREATE API INTEGRATION command. Users can write and call their own remote services, or call remote services written by third parties. These remote services can be written using any HTTP server stack,including cloud serverless compute services such as AWS Lambda.
Question 10
Single choice
Which of the following is a useful tool for gaining insights into the relationship between features and predictions?
-
A
-
B
-
C
Partial dependence plots(PDP)
-
D
FULL dependence plots (FDP)
Reveal answer details
Close answer details
Correct answerC
ExplanationExplanation: Partial dependence plots (PDP) is a useful tool for gaining insights into the relationship between features and predictions. It helps us understand how different values of a particular feature impact model's predictions.
|