Professional Machine Learning Engineer Practice Test
Professional Machine Learning Engineer Practice Test practice questions, page 8 of 15, with answer review and explanations.
Question 36
You are building a model to predict daily temperatures. You split the data randomly and then transformed the training and test datasets. Temperature data for model training is uploaded hourly. During testing, your model performed with 97% accuracy; however, after deploying to production, the model's accuracy dropped to 66%. How can you make your production model more accurate?
Normalize the data for the training, and test datasets as two separate steps.
Split the training and test data based on time rather than a random split to avoid leakage.
Add more data to your test set to ensure that you have a fair distribution and sample for testing.
Apply data transformations before splitting, and cross-validate to make sure that the transformations are applied to both the training and test sets.
Question 37
You are developing models to classify customer support emails. You created models with TensorFlow Estimators using small datasets on your on-premises system, but you now need to train the models using large datasets to ensure high performance. You will port your models to Google Cloud and want to minimize code refactoring and infrastructure overhead for easier migration from on-prem to cloud. What should you do?
Use AI Platform for distributed training.
Create a cluster on Dataproc for training.
Create a Managed Instance Group with autoscaling.
Use Kubeflow Pipelines to train on a Google Kubernetes Engine cluster.
Question 38
You have trained a text classification model in TensorFlow using AI Platform. You want to use the trained model for batch predictions on text data stored in BigQuery while minimizing computational overhead. What should you do?
Export the model to BigQuery ML.
Deploy and version the model on AI Platform.
Use Dataflow with the SavedModel to read the data from BigQuery.
Submit a batch prediction job on AI Platform that points to the model location in Cloud Storage.
Question 39
You work with a data engineering team that has developed a pipeline to clean your dataset and save it in a Cloud Storage bucket. You have created an ML model and want to use the data to refresh your model as soon as new data is available. As part of your CI/CD workflow, you want to automatically run a Kubeflow Pipelines training job on Google Kubernetes Engine (GKE). How should you architect this workflow?
Configure your pipeline with Dataflow, which saves the files in Cloud Storage. After the file is saved, start the training job on a GKE cluster.
Use App Engine to create a lightweight python client that continuously polls Cloud Storage for new files. As soon as a file arrives, initiate the training job.
Configure a Cloud Storage trigger to send a message to a Pub/Sub topic when a new file is available in a storage bucket. Use a Pub/Sub-triggered Cloud Function to start the training job on a GKE cluster.
Use Cloud Scheduler to schedule jobs at a regular interval. For the first step of the job, check the timestamp of objects in your Cloud Storage bucket. If there are no new files since the last run, abort the job.
Question 40
You have a functioning end-to-end ML pipeline that involves tuning the hyperparameters of your ML model using AI Platform, and then using the best-tuned parameters for training. Hypertuning is taking longer than expected and is delaying the downstream processes. You want to speed up the tuning job without significantly compromising its effectiveness. Which actions should you take? (Choose two.)
Decrease the number of parallel trials.
Decrease the range of floating-point values.
Set the early stopping parameter to TRUE.
Change the search algorithm from Bayesian search to random search.
Decrease the maximum number of trials during subsequent training phases.