exam questions

Exam Professional Machine Learning Engineer All Questions

View all questions & answers for the Professional Machine Learning Engineer exam

Exam Professional Machine Learning Engineer topic 1 question 290 discussion

Actual exam question from Google's Professional Machine Learning Engineer
Question #: 290
Topic #: 1
[All Professional Machine Learning Engineer Questions]

You developed a Python module by using Keras to train a regression model. You developed two model architectures, linear regression and deep neural network (DNN), within the same module. You are using the training_method argument to select one of the two methods, and you are using the learning_rate and num_hidden_layers arguments in the DNN. You plan to use Vertex AI's hypertuning service with a budget to perform 100 trials. You want to identify the model architecture and hyperparameter values that minimize training loss and maximize model performance. What should you do?

  • A. Run one hypertuning job for 100 trials. Set num_hidden_layers as a conditional hyperparameter based on its parent hyperparameter training_method, and set learning_rate as a non-conditional hyperparameter.
  • B. Run two separate hypertuning jobs, a linear regression job for 50 trials, and a DNN job for 50 trials. Compare their final performance on a common validation set, and select the set of hyperparameters with the least training loss.
  • C. Run one hypertuning job with training_method as the hyperparameter for 50 trials. Select the architecture with the lowest training loss, and further hypertune it and its corresponding hyperparameters tor 50 trials.
  • D. Run one hypertuning job for 100 trials. Set num_hidden_layers and learning_rate as conditional hyperparameters based on their parent hyperparameter training_method.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
kaneup
1 week ago
Selected Answer: D
this is D
upvoted 1 times
...
River3000
2 weeks, 4 days ago
This should be D, as the question stated that 'linear regression and deep neural network (DNN), within the same module', This typically means that even the linear regression model is trained using gradient-based optimization (such as SGD or Adam), rather than using a closed-form solution. So, the phrase "within the same module" implies that the linear model also relies on gradient descent, and thus the learning_rate parameter is applicable for training both models—even though the DNN additionally uses the num_hidden_layers parameter for its architecture.
upvoted 1 times
...
Ankit267
3 months ago
Selected Answer: A
A & D for obvious reasons. Why A ? DNN with 1 num_hidden_layer is equivalent to linear regression model therefore num_hidden_layer is conditional, though learning_rate can be hyperparametrized for both DNN( one hidden layer i.e. linear regression & >1 hidden layer i.e. DNN). Therefore A is the right answer
upvoted 1 times
...
Pau1234
3 months, 2 weeks ago
Selected Answer: A
Agree with Omi_04040. num_hidden_layers is only relevant to the DNN model and not the linear regression model, according to the documentation
upvoted 2 times
...
Omi_04040
3 months, 3 weeks ago
Selected Answer: A
Answer is A since 'learning rate' cannot be shared This question is a literal spinoff from this paragraph https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview#conditional_hyperparameters
upvoted 2 times
...
rajshiv
3 months, 3 weeks ago
Selected Answer: D
A is incorrect because both num_hidden_layers and learning_rate are hyperparameters specific to the DNN model. Since both hyperparameters need to be conditional on training_method being DNN, making only one of them conditional is not sufficient. The problem has two model architectures: linear regression and DNN. Depending on the model architecture, the hyperparameters change: 1) For DNN, the hyperparameters are num_hidden_layers and learning_rate while 2) For linear regression, these hyperparameters are not relevant. Hence I vote D.
upvoted 2 times
...
lunalongo
4 months, 1 week ago
A is the best option because: Running one single job with conditional logics added to hyperparameters settings avoids unnecessary computing usage and comparison efforts. Only num_hidden_layers needs to be set as a conditional hyperparameter under training_method; no explicit conditional logic is needed for learning_rate -- the latter is intelligently ignored by Vertex AI when linear regression is the training_method. B, C and D are less suitable because B and C run 2 separate jobs; D runs only one job, but it's hyperparameter tuning strategy adds redundant processing, even if it's true that the learning_rate is irrelevant for linear regression methods. The underlying logics behind it: As a STRUCTURAL hyperparameter, num_hidden_layers is intrinsically tied to the DNN's architecture definition. As a TRAINING hyperparameter, learning_rate is linked to the training process, not directly tied to the architecture definition.
upvoted 3 times
...
carolctech
5 months, 1 week ago
Selected Answer: A
The best approach is A and here's why: The use of the 100 trials in a single job by using conditional hyperparameters maximizes budget efficiency. The number of hidden layers should be conditional, because it is relevant only for NON-LINEAR models like neural networks (which is DNN's case) and not for linear models -- where hidden layers don't exist. Learning rate is relevant for both models, unless the question stated that the regression model used a closed-form solution, not a gradient-based optimization method.
upvoted 3 times
...
JDpmle2024
5 months, 1 week ago
Selected Answer: D
This would allow you to first set the type of job, and only after that any other parameters. So first, select training_method. If training_method is DNN, then you specify the other parameters.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago