A vs Y-hat

A seems to be the same as Y-hat. I wonder why we needed the extra A variable. Why not use Y-hat everywhere? Using A seems to create additional unnecessary complexity.

But A is easier to write as a variable name than Yhat or Y_hat. :grinning_face_with_smiling_eyes:

When he is writing mathematical equations, Professor Ng will frequently use \hat{Y} or \hat{y}, but when writing python code, it is easier to use A. Sorry, but you’ll just need to be flexible about this. Both notations are used in many places.

1 Like

Also note that when we get past Week 2 and into actual neural networks with more than one layer, we’ll have A^{[l]} as the output of each layer of the network and then the final output is A^{[L]} or \hat{Y}, where L is the number of the final layer. Stay tuned for that in Week 3 and beyond.

1 Like