C1W3 assignment:
For Cost function exercise, what do labels, and num_examples mean? (mentioned in NN model description.) Can anyone explain in terms of Z=WX+b ? also, How are “parameters” are being retrieved from the dictionary for forward_propagation function? Is it a predefined dictionary running on backend?
Hey there @ninadmehta34
In terms of Z = WX + b , labels
refer to the true values for each training example, which you compare against the predicted output during the cost function calculation.
num_examples
refers to the number of training examples in your dataset, which is used to average the cost over all examples.
parameters
are retrieved from the dictionary that stores the weights W and biases b for each layer.
Hope it helps! Feel free to ask if you need further assistance.
Thank you, @Alireza_Saei . Got the parameters and labels part. So, again, comparing the output of Z=Wx+b with true values (i.e. the ‘labels’), right?
And for the num_examples part: over here, training examples in dataset refers to entries in dataset?
Yes, that’s correct! The output Z = WX + b is compared with the true labels to compute the cost function. And for num_examples
, it refers to the number of entries (or rows) in your dataset used for training.
Okay. Okay. Thank you!
You’re welcome! happy to help