πŸ”

PMLE β€” questions

Page 8 of 17 Β· 339 total questions.

Topic 1 Β· Question 141

You work for a magazine publisher and have been tasked with predicting whether customers will cancel their annual subscription. In your exploratory data analysis, you find that 90% of individuals renew their subscription every year, and only 10% of individuals cancel their subscription. After training a NN Classifier, your model predicts those who cancel their subscription with 99% accuracy and predicts those who renew their subscription with 82% accuracy. How should you interpret these results?

  • AThis is not a good result because the model should have a higher accuracy for those who renew their subscription than for those who cancel their subscription.
  • BThis is not a good result because the model is performing worse than predicting that people will always renew their subscription.
  • CThis is a good result because predicting those who cancel their subscription is more difficult, since there is less data for this group. (correct answer)
  • DThis is a good result because the accuracy across both groups is greater than 80%.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: This is a good result because predicting those who cancel their subscription is more difficult, since there is less data for this group.

Topic 1 Β· Question 142

You have built a model that is trained on data stored in Parquet files. You access the data through a Hive table hosted on Google Cloud. You preprocessed these data with PySpark and exported it as a CSV file into Cloud Storage. After preprocessing, you execute additional steps to train and evaluate your model. You want to parametrize this model training in Kubeflow Pipelines. What should you do?

  • ARemove the data transformation step from your pipeline.
  • BContainerize the PySpark transformation step, and add it to your pipeline.
  • CAdd a ContainerOp to your pipeline that spins a Dataproc cluster, runs a transformation, and then saves the transformed data in Cloud Storage. (correct answer)
  • DDeploy Apache Spark at a separate node pool in a Google Kubernetes Engine cluster. Add a ContainerOp to your pipeline that invokes a corresponding transformation job for this Spark instance.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add a ContainerOp to your pipeline that spins a Dataproc cluster, runs a transformation, and then saves the transformed data in Cloud Storage.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Dataproc runs managed Spark and Hadoop clusters for big-data processing.

Topic 1 Β· Question 143

You have developed an ML model to detect the sentiment of users’ posts on your company's social media page to identify outages or bugs. You are using Dataflow to provide real-time predictions on data ingested from Pub/Sub. You plan to have multiple training iterations for your model and keep the latest two versions live after every run. You want to split the traffic between the versions in an 80:20 ratio, with the newest model getting the majority of the traffic. You want to keep the pipeline as simple as possible, with minimal management required. What should you do?

  • ADeploy the models to a Vertex AI endpoint using the traffic-split=0=80, PREVIOUS_MODEL_ID=20 configuration. (correct answer)
  • BWrap the models inside an App Engine application using the --splits PREVIOUS_VERSION=0.2, NEW_VERSION=0.8 configuration
  • CWrap the models inside a Cloud Run container using the REVISION1=20, REVISION2=80 revision configuration.
  • DImplement random splitting in Dataflow using beam.Partition() with a partition function calling a Vertex AI endpoint.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Deploy the models to a Vertex AI endpoint using the traffic-split=0=80, PREVIOUS_MODEL_ID=20 configuration.

Explanation

Vertex AI is the unified managed platform to build, train, tune, deploy, and operate ML models. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 144

You are developing an image recognition model using PyTorch based on ResNet50 architecture. Your code is working fine on your local laptop on a small subsample. Your full dataset has 200k labeled images. You want to quickly scale your training workload while minimizing cost. You plan to use 4 V100 GPUs. What should you do?

  • ACreate a Google Kubernetes Engine cluster with a node pool that has 4 V100 GPUs. Prepare and submit a TFJob operator to this node pool.
  • BCreate a Vertex AI Workbench user-managed notebooks instance with 4 V100 GPUs, and use it to train your model.
  • CPackage your code with Setuptools, and use a pre-built container. Train your model with Vertex AI using a custom tier that contains the required GPUs. (correct answer)
  • DConfigure a Compute Engine VM with all the dependencies that launches the training. Train your model with Vertex AI using a custom tier that contains the required GPUs.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Package your code with Setuptools, and use a pre-built container. Train your model with Vertex AI using a custom tier that contains the required GPUs.

Explanation

Vertex AI is the unified managed platform to build, train, tune, deploy, and operate ML models.

Topic 1 Β· Question 145

You have trained a DNN regressor with TensorFlow to predict housing prices using a set of predictive features. Your default precision is tf.float64, and you use a standard TensorFlow estimator: Your model performs well, but just before deploying it to production, you discover that your current serving latency is 10ms @ 90 percentile and you currently serve on CPUs. Your production requirements expect a model latency of 8ms @ 90 percentile. You're willing to accept a small decrease in performance in order to reach the latency requirement. Therefore your plan is to improve latency while evaluating how much the model's prediction decreases. What should you first try to quickly lower the serving latency?

Exhibit 1 for question 145
  • ASwitch from CPU to GPU serving.
  • BApply quantization to your SavedModel by reducing the floating point precision to tf.float16. (correct answer)
  • CIncrease the dropout rate to 0.8 and retrain your model.
  • DIncrease the dropout rate to 0.8 in _PREDICT mode by adjusting the TensorFlow Serving parameters.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Apply quantization to your SavedModel by reducing the floating point precision to tf.float16.

Topic 1 Β· Question 146

You work on the data science team at a manufacturing company. You are reviewing the company’s historical sales data, which has hundreds of millions of records. For your exploratory data analysis, you need to calculate descriptive statistics such as mean, median, and mode; conduct complex statistical tests for hypothesis testing; and plot variations of the features over time. You want to use as much of the sales data as possible in your analyses while minimizing computational resources. What should you do?

  • AVisualize the time plots in Google Data Studio. Import the dataset into Vertex Al Workbench user-managed notebooks. Use this data to calculate the descriptive statistics and run the statistical analyses.
  • BSpin up a Vertex Al Workbench user-managed notebooks instance and import the dataset. Use this data to create statistical and visual analyses.
  • CUse BigQuery to calculate the descriptive statistics. Use Vertex Al Workbench user-managed notebooks to visualize the time plots and run the statistical analyses. (correct answer)
  • DUse BigQuery to calculate the descriptive statistics, and use Google Data Studio to visualize the time plots. Use Vertex Al Workbench user-managed notebooks to run the statistical analyses.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use BigQuery to calculate the descriptive statistics. Use Vertex Al Workbench user-managed notebooks to visualize the time plots and run the statistical analyses.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 147

Your data science team needs to rapidly experiment with various features, model architectures, and hyperparameters. They need to track the accuracy metrics for various experiments and use an API to query the metrics over time. What should they use to track and report their experiments while minimizing manual effort?

  • AUse Vertex Al Pipelines to execute the experiments. Query the results stored in MetadataStore using the Vertex Al API. (correct answer)
  • BUse Vertex Al Training to execute the experiments. Write the accuracy metrics to BigQuery, and query the results using the BigQuery API.
  • CUse Vertex Al Training to execute the experiments. Write the accuracy metrics to Cloud Monitoring, and query the results using the Monitoring API.
  • DUse Vertex Al Workbench user-managed notebooks to execute the experiments. Collect the results in a shared Google Sheets file, and query the results using the Google Sheets API.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Vertex Al Pipelines to execute the experiments. Query the results stored in MetadataStore using the Vertex Al API.

Explanation

Datastore (Firestore in Datastore mode) is a serverless NoSQL database for user profiles and app state.

Topic 1 Β· Question 148

You are training an ML model using data stored in BigQuery that contains several values that are considered Personally Identifiable Information (PII). You need to reduce the sensitivity of the dataset before training your model. Every column is critical to your model. How should you proceed?

  • AUsing Dataflow, ingest the columns with sensitive data from BigQuery, and then randomize the values in each sensitive column.
  • BUse the Cloud Data Loss Prevention (DLP) API to scan for sensitive data, and use Dataflow with the DLP API to encrypt sensitive values with Format Preserving Encryption. (correct answer)
  • CUse the Cloud Data Loss Prevention (DLP) API to scan for sensitive data, and use Dataflow to replace all sensitive data by using the encryption algorithm AES-256 with a salt.
  • DBefore training, use BigQuery to select only the columns that do not contain sensitive data. Create an authorized view of the data so that sensitive values cannot be accessed by unauthorized individuals.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use the Cloud Data Loss Prevention (DLP) API to scan for sensitive data, and use Dataflow with the DLP API to encrypt sensitive values with Format Preserving Encryption.

Explanation

Dataflow runs serverless Apache Beam pipelines for stream and batch data processing with autoscaling.

Topic 1 Β· Question 149 Β· Select all that apply

You recently deployed an ML model. Three months after deployment, you notice that your model is underperforming on certain subgroups, thus potentially leading to biased results. You suspect that the inequitable performance is due to class imbalances in the training data, but you cannot collect more data. What should you do? (Choose two.)

  • ARemove training examples of high-performing subgroups, and retrain the model.
  • BAdd an additional objective to penalize the model more for errors made on the minority class, and retrain the model (correct answer)
  • CRemove the features that have the highest correlations with the majority class.
  • DUpsample or reweight your existing training data, and retrain the model (correct answer)
  • ERedeploy the model, and provide a label explaining the model's behavior to users.
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: Add an additional objective to penalize the model more for errors made on the minority class, and retrain the model Option D: Upsample or reweight your existing training data, and retrain the model.

Topic 1 Β· Question 150

You are working on a binary classification ML algorithm that detects whether an image of a classified scanned document contains a company’s logo. In the dataset, 96% of examples don’t have the logo, so the dataset is very skewed. Which metric would give you the most confidence in your model?

  • APrecision
  • BRecall
  • CRMSE
  • DF1 score (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: F1 score.

Topic 1 Β· Question 151

While running a model training pipeline on Vertex Al, you discover that the evaluation step is failing because of an out-of-memory error. You are currently using TensorFlow Model Analysis (TFMA) with a standard Evaluator TensorFlow Extended (TFX) pipeline component for the evaluation step. You want to stabilize the pipeline without downgrading the evaluation quality while minimizing infrastructure overhead. What should you do?

  • AInclude the flag -runner=DataflowRunner in beam_pipeline_args to run the evaluation step on Dataflow. (correct answer)
  • BMove the evaluation step out of your pipeline and run it on custom Compute Engine VMs with sufficient memory.
  • CMigrate your pipeline to Kubeflow hosted on Google Kubernetes Engine, and specify the appropriate node parameters for the evaluation step.
  • DAdd tfma.MetricsSpec () to limit the number of metrics in the evaluation step.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Include the flag -runner=DataflowRunner in beam_pipeline_args to run the evaluation step on Dataflow.

Explanation

Dataflow runs serverless Apache Beam pipelines for stream and batch data processing with autoscaling.

Topic 1 Β· Question 152

You are developing an ML model using a dataset with categorical input variables. You have randomly split half of the data into training and test sets. After applying one-hot encoding on the categorical variables in the training set, you discover that one categorical variable is missing from the test set. What should you do?

  • AUse sparse representation in the test set.
  • BRandomly redistribute the data, with 70% for the training set and 30% for the test set
  • CApply one-hot encoding on the categorical variables in the test data (correct answer)
  • DCollect more data representing all categories
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Apply one-hot encoding on the categorical variables in the test data.

Topic 1 Β· Question 153

You work for a bank and are building a random forest model for fraud detection. You have a dataset that includes transactions, of which 1% are identified as fraudulent. Which data transformation strategy would likely improve the performance of your classifier?

  • AModify the target variable using the Box-Cox transformation.
  • BZ-normalize all the numeric features.
  • COversample the fraudulent transaction 10 times. (correct answer)
  • DLog transform all numeric features.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Oversample the fraudulent transaction 10 times.

Topic 1 Β· Question 154

You are developing a classification model to support predictions for your company’s various products. The dataset you were given for model development has class imbalance You need to minimize false positives and false negatives What evaluation metric should you use to properly train the model?

  • AF1 score (correct answer)
  • BRecall
  • CAccuracy
  • DPrecision
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: F1 score.

Topic 1 Β· Question 155

You are training an object detection machine learning model on a dataset that consists of three million X-ray images, each roughly 2 GB in size. You are using Vertex AI Training to run a custom training application on a Compute Engine instance with 32-cores, 128 GB of RAM, and 1 NVIDIA P100 GPU. You notice that model training is taking a very long time. You want to decrease training time without sacrificing model performance. What should you do?

  • AIncrease the instance memory to 512 GB, and increase the batch size.
  • BReplace the NVIDIA P100 GPU with a K80 GPU in the training job.
  • CEnable early stopping in your Vertex AI Training job.
  • DUse the tf.distribute.Strategy API and run a distributed training job. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use the tf.distribute.Strategy API and run a distributed training job.

Topic 1 Β· Question 156

You need to build classification workflows over several structured datasets currently stored in BigQuery. Because you will be performing the classification several times, you want to complete the following steps without writing code: exploratory data analysis, feature selection, model building, training, and hyperparameter tuning and serving. What should you do?

  • ATrain a TensorFlow model on Vertex AI.
  • BTrain a classification Vertex AutoML model. (correct answer)
  • CRun a logistic regression job on BigQuery ML.
  • DUse scikit-learn in Vertex AI Workbench user-managed notebooks with pandas library.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Train a classification Vertex AutoML model.

Explanation

AutoML trains high-quality custom models from your data with minimal ML expertise. This option needs the least custom development effort.

Topic 1 Β· Question 157

You recently developed a deep learning model. To test your new model, you trained it for a few epochs on a large dataset. You observe that the training and validation losses barely changed during the training run. You want to quickly debug your model. What should you do first?

  • AVerify that your model can obtain a low loss on a small subset of the dataset (correct answer)
  • BAdd handcrafted features to inject your domain knowledge into the model
  • CUse the Vertex AI hyperparameter tuning service to identify a better learning rate
  • DUse hardware accelerators and train your model for more epochs
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Verify that your model can obtain a low loss on a small subset of the dataset.

Topic 1 Β· Question 158

You are a data scientist at an industrial equipment manufacturing company. You are developing a regression model to estimate the power consumption in the company’s manufacturing plants based on sensor data collected from all of the plants. The sensors collect tens of millions of records every day. You need to schedule daily training runs for your model that use all the data collected up to the current date. You want your model to scale smoothly and require minimal development work. What should you do?

  • ADevelop a custom TensorFlow regression model, and optimize it using Vertex AI Training.
  • BDevelop a regression model using BigQuery ML. (correct answer)
  • CDevelop a custom scikit-learn regression model, and optimize it using Vertex AI Training.
  • DDevelop a custom PyTorch regression model, and optimize it using Vertex AI Training.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Develop a regression model using BigQuery ML.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 159

Your organization manages an online message board. A few months ago, you discovered an increase in toxic language and bullying on the message board. You deployed an automated text classifier that flags certain comments as toxic or harmful. Now some users are reporting that benign comments referencing their religion are being misclassified as abusive. Upon further inspection, you find that your classifier's false positive rate is higher for comments that reference certain underrepresented religious groups. Your team has a limited budget and is already overextended. What should you do?

  • AAdd synthetic training data where those phrases are used in non-toxic ways. (correct answer)
  • BRemove the model and replace it with human moderation.
  • CReplace your model with a different text classifier.
  • DRaise the threshold for comments to be considered toxic or harmful.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add synthetic training data where those phrases are used in non-toxic ways.

Topic 1 Β· Question 160

You work for a magazine distributor and need to build a model that predicts which customers will renew their subscriptions for the upcoming year. Using your company’s historical data as your training set, you created a TensorFlow model and deployed it to Vertex AI. You need to determine which customer attribute has the most predictive power for each prediction served by the model. What should you do?

  • AStream prediction results to BigQuery. Use BigQuery’s CORR(X1, X2) function to calculate the Pearson correlation coefficient between each feature and the target variable.
  • BUse Vertex Explainable AI. Submit each prediction request with the explain' keyword to retrieve feature attributions using the sampled Shapley method. (correct answer)
  • CUse Vertex AI Workbench user-managed notebooks to perform a Lasso regression analysis on your model, which will eliminate features that do not provide a strong signal.
  • DUse the What-If tool in Google Cloud to determine how your model will perform when individual features are excluded. Rank the feature importance in order of those that caused the most significant performance drop when removed from the model.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use Vertex Explainable AI. Submit each prediction request with the explain' keyword to retrieve feature attributions using the sampled Shapley method.

Showing questions 141–160 of 339 Β· Page 8 of 17