I can use an if-else loop and convert activation to Y_Prediction as mentioned below
- Convert the entries of a into 0 (if activation <= 0.5) or 1 (if activation > 0.5), stores the predictions in a vector
Y_prediction. If you wish, you can use anif/elsestatement in aforloop
Though there is also a way to vectorize this, can someone share vectorize version?