标签:pre 分类 none orm oat size red span parameter
# Print accuracy
predictions = predict(parameters, X)
# (np.dot(Y, predictions.T) + np.dot(1 - Y, 1 - predictions.T)) / Y.size
print ("Accuracy: {} %".format(100 - np.mean(abs(predictions - Y)) * 100)) # 或者
print (‘Accuracy: %d‘ % float((np.dot(Y, predictions.T) + np.dot(1-Y,1-predictions.T))/float(Y.size)*100) + ‘%‘)
标签:pre 分类 none orm oat size red span parameter
原文地址:https://www.cnblogs.com/douzujun/p/10312169.html