In Wk3, Ex 5.2, the model uses the following equation to compute accuracy:

print ('Accuracy: d' float((np.dot(Y, predictions.T) + np.dot(1 - Y, 1 - predictions.T)) / float(Y.size) * 100) + ‘%’)

Can a mentor explain the reasoning behind this equation ?

I know Accuracy calculation =

Is this equation basically accomplishing the same thing as the eq above?

Thanks!

Kevin