Move the prediction closer to the target and compare the numbers.
target = 4
prediction = 7
print(abs(target - prediction)) Line notes
- Set the known target value.
- Set one prediction.
- Print the distance from the prediction to the target.
Question 2 of 5
The helper receives a new question about a delay. Does that request change what the model learned earlier?
You show a model a photo of a bus and it calls it a truck. If the app only displays that prediction, the model’s parameters stay the same. In a training example the photo comes with the label “bus”. The training program compares the prediction with that label and uses the error to adjust the parameters.
WHERE TO START
When did the model last receive a correct answer to compare against?
Move the prediction closer to the target and compare the numbers.
target = 4
prediction = 7
print(abs(target - prediction))