You have a Jupyter Notebook that contains Python code that is used to train a model.
You must create a Python script for the production deployment. The solution must minimize code maintenance.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A. Refactor the Jupyter Notebook code into functions
B. Save each function to a separate Python file
C. Define a main() function in the Python script
D. Remove all comments and functions from the Python script
Show Answer
Correct Answer: A, C
Explanation: To convert a Jupyter Notebook into a production-ready Python script while minimizing code maintenance, the notebook code should be refactored into reusable functions so that logic is not duplicated and is easier to test and maintain. Defining a main() function in the Python script provides a clear entry point for execution and aligns with standard Python production practices. Saving each function into separate files is unnecessary overhead, and removing comments or functions would reduce maintainability rather than improve it.
Question 244
HOTSPOT -
You are using an Azure Machine Learning workspace. You set up an environment for model testing and an environment for production.
The compute target for testing must minimize cost and deployment efforts. The compute target for production must provide fast response time, autoscaling of the deployed service, and support real-time inferencing.
You need to configure compute targets for model testing and production.
Which compute targets should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Show Answer
Correct Answer: Testing: Local web service
Production: Azure Kubernetes Service (AKS)
Explanation: Local web service is the lowest-cost option and requires minimal setup, making it ideal for quick model testing and debugging. AKS supports real-time inference with fast response times, built-in autoscaling, and high availability, which are required for production deployments.
Question 245
You have a dataset that contains salary information for users. You plan to generate an aggregate salary report that shows average salaries by city.
Privacy of individuals must be preserved without impacting accuracy, completeness, or reliability of the data. The aggregation must be statistically consistent with the distribution of the original data. You must return an approximation of the data instead of the raw data.
You need to apply a differential privacy approach.
What should you do?
A. Add noise to the salary data during the analysis
B. Encrypt the salary data before analysis
C. Remove the salary data
D. Convert the salary data to the average column value
Show Answer
Correct Answer: A
Explanation: Differential privacy is achieved by adding carefully calibrated noise (e.g., Laplace or Gaussian) to query results or during analysis so that individual contributions are obscured while aggregate statistics (like average salary by city) remain statistically consistent and reliable. Encryption, removal, or simple averaging do not provide differential privacy guarantees.
Question 246
You create a binary classification model. You use the Fairlearn package to assess model fairness.
You must eliminate the need to retrain the model.
You need to implement the Fairlearn package.
Which algorithm should you use?
A. fairlearn.reductions.ExponentiatedGradient
B. fairlearn.postprocessing.ThresholdOptimizer
C. fairlearnpreprocessing.CorrelationRemover
D. fairlearn.reductions.GridSearch
Show Answer
Correct Answer: B
Explanation: The requirement is to improve fairness without retraining the model. In Fairlearn, post-processing methods satisfy this constraint. ThresholdOptimizer is a post-processing algorithm that adjusts decision thresholds of an existing binary classifier to meet fairness constraints without retraining. The other options are preprocessing or in-processing approaches that require retraining.
Question 247
You are attaching an Azure Databricks-based compute resource to an Azure Machine Learning development workspace.
You need to configure parameters to attach the resource.
Which three parameters should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A. Workspace name
B. Compute name
C. Workspace user credentials
D. Workspace resource ID
E. Access token
Show Answer
Correct Answer: A, B, E
Explanation: To attach an Azure Databricks compute to an Azure Machine Learning workspace, you must specify the Databricks compute name, the Databricks workspace name, and an access token for authentication. Workspace user credentials are not used, and the workspace resource ID is not required when attaching via DatabricksAttachConfiguration in this context.
Question 248
DRAG DROP -
You use a training pipeline in the Azure Machine Learning designer. You register a datastore named ds1. The datastore contains multiple training data files. You use the Import Data module with the configured datastore.
You need to retrain a model on a different set of data files.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:
Show Answer
Correct Answer: Add a new parameter in the module indicating the path to the training file.
Specify a new path to the training file as a parameter value.
Publish a training pipeline.
Run the training pipeline by using the studio portal.
Explanation: To retrain with different files in the same datastore, the Import Data module must be parameterized. You first create a parameter for the file path, then provide a new value for that parameter, publish the pipeline so it can accept parameters, and finally run the pipeline with the updated path.
Question 249
You have a dataset that includes confidential data. You use the dataset to train a model.
You must use a differential privacy parameter to keep the data of individuals safe and private.
You need to reduce the effect of user data on aggregated results.
What should you do?
A. Decrease the value of the epsilon parameter to reduce the amount of noise added to the data
B. Increase the value of the epsilon parameter to decrease privacy and increase accuracy
C. Decrease the value of the epsilon parameter to increase privacy and reduce accuracy
D. Set the value of the epsilon parameter to 1 to ensure maximum privacy
Show Answer
Correct Answer: C
Explanation: In differential privacy, the epsilon (ε) parameter controls the privacy–utility trade-off. A smaller epsilon means stronger privacy guarantees because more noise is added, which reduces the influence of any single individual’s data on the aggregated results. This increased privacy comes at the cost of reduced model accuracy. Therefore, decreasing epsilon to increase privacy and reduce accuracy is the correct action.
Question 250
This question is included in a number of questions that depicts the identical set-up. However, every question has a distinctive result. Establish if the recommendation satisfies the requirements.
You have been tasked with constructing a machine learning model that translates language text into a different language text.
The machine learning model must be constructed and trained to learn the sequence of the.
Recommendation: You make use of Recurrent Neural Networks (RNNs).
Will the requirements be satisfied?
A. Yes
B. No
Show Answer
Correct Answer: A
Explanation: The task is machine translation, which is inherently a sequence-to-sequence problem where the model must learn dependencies across ordered tokens in text. Recurrent Neural Networks are specifically designed to model sequential data by maintaining hidden state across time steps, and they have historically been used successfully for language modeling and machine translation. Therefore, using RNNs satisfies the requirement of learning sequences for translating text from one language to another.
Question 251
You have been tasked with designing a deep learning model, which accommodates the most recent edition of Python, to recognize language.
You have to include a suitable deep learning framework in the Data Science Virtual Machine (DSVM).
Which of the following actions should you take?
A. You should consider including Rattle.
B. You should consider including TensorFlow.
C. You should consider including Theano.
D. You should consider including Chainer.
Show Answer
Correct Answer: B
Explanation: The task requires a modern deep learning framework that works well with the latest Python and supports natural language processing. TensorFlow is actively maintained, widely supported, and commonly included in Data Science Virtual Machines for deep learning and NLP tasks. Rattle is R-based, Theano is deprecated, and Chainer is no longer actively developed, making them less suitable choices.
Question 252
DRAG DROP -
You are planning to host practical training to acquaint staff with Docker for Windows.
Staff devices must support the installation of Docker.
Which of the following are requirements for this installation? Answer by dragging the correct options from the list to the answer area.
Select and Place:
Show Answer
Correct Answer: 4 GB of system RAM
BIOS-enabled virtualization
Windows 10 64-bit
Explanation: Docker for Windows requires a 64-bit edition of Windows 10, hardware virtualization enabled in BIOS (for Hyper-V/containers), and a minimum of 4 GB RAM. The other options are not installation requirements.
$19
Get all 477 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.