Data Science, Artificial Intelligence, AI, Machine Learning, Python.
= np.array(formula1.subs('x_1', X[i,0]).subs('x_2', X[i,1])).astype(np.float64) logit2 = np.array(formula2.subs('x_1', X[i,0]).subs('x_2', X[i,1])).astype(np.float64) correct += (logit2 > logit1) == y[i] return correct/batch # Print Accuracy print('train acc of the formula:', acc(formula1,