During supervised training, a model produces predictions for examples whose targets are known. What is the loss function's role?
3 Training and Testing Models Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 Training and Testing Models, test your knowledge, and prepare for your next test or exam.
A trained home-price model receives the size of a new home and produces a price estimate. This is inference, and it does not ordinarily update the model's parameters.
- A
True
- B
False
What do we call the output a model produces for a particular input?
- A
A target
- B
A parameter
- C
A prediction
- D
A loss function
A supervised-learning dataset is being prepared to predict home sale prices. Select all statements that correctly describe the examples.
- A
A home's characteristics can serve as input features.
- B
A home's characteristics are the target sale price.
- C
The known sale price can serve as the target.
- D
A supervised example must omit its target.
A training process may repeat over examples or batches for multiple passes, stopping according to a chosen rule.
- A
True
- B
False
During training, a measures how far predictions are from targets, while an adjusts parameters to reduce that measure.
In scikit-learn, an estimator has already been fitted. Which operation should be used to obtain its prediction for a new input without training it again?
- A
Use fit on every new input to obtain a prediction.
- B
Use predict to change the estimator's parameters.
- C
Use fit to measure the prediction for a new input.
- D
Use predict with the fitted estimator to obtain an output.
A home-price model uses the formula predicted price=weight×size+bias. If the weight is 2, the size is 3, and the bias is 5, what numerical value does the model predict?
Which actions are part of a typical model-training process? Select all that apply.
- A
Produce predictions for training examples.
- B
Measure the predictions against known targets.
- C
Apply learned parameters to new inputs without changing them.
- D
Adjust parameters to reduce the measured loss.
What makes up a trained model after its parameter values have been learned?
- A
Only the examples used during training
- B
The learned parameter values together with the model's structure
- C
Only the loss function and optimization method
- D
The predictions made for the training examples
Enter the single term for the output a model produces for an input.
An email classifier produces a spam score and then assigns the email a “spam” or “not spam” label. Explain how the score and label relate, and whether the model's result is guaranteed to be correct.
A machine-learning model's prediction is always guaranteed to be correct.
- A
True
- B
False
A supervised-learning example contains a home’s characteristics and its known sale price. What role does the known sale price play?
- A
It is an input feature used to describe the home.
- B
It is the target the model learns to predict from the home’s features.
- C
It is a parameter that the model adjusts during training.
- D
It is the loss function used to measure prediction error.
During training, a model’s predictions differ from known targets. Which description correctly distinguishes the roles of the loss function and the optimization method?
- A
The optimization method measures prediction error, and the loss function changes the parameters.
- B
The loss function produces predictions, and the optimization method supplies the known targets.
- C
The loss function measures how far predictions are from targets, and the optimization method adjusts parameters to reduce that difference.
- D
The loss function selects new input features, and the optimization method decides the model’s output type.
A fitted home-price model receives the size of a new home and returns a price estimate. The model’s parameters are not changed. What is the model doing?
- A
It is training because every new input automatically changes the model’s parameters.
- B
It is inference because the trained model applies its learned parameters to produce an output.
- C
It is training because the model must first compare the new input with a known target.
- D
It is neither training nor inference because the input has not yet been assigned a class.
In the model expression predicted price=weight×size+bias, what is the name of the parameter that multiplies size?
A home-price model uses predicted price=weight×size+bias. For a home with size 6, weight 2.5, and bias 4, what value does the model predict?
In scikit-learn, which pairing correctly describes the operations used to train an estimator and then obtain its predictions?
- A
fittrains the estimator;predictobtains outputs from the fitted estimator. - B
predicttrains the estimator;fitobtains outputs from it. - C
Both
fitandpredicttrain the estimator, but on different inputs. - D
fitmeasures the loss;predictadjusts the parameters to reduce it.
A home-price model receives the size of a new home and predicts its price. The sale price is not yet known, and the input is used only to make a prediction. It is not yet a .