Last active
May 19, 2020 05:01
-
-
Save vamc-stash/5dab6347b1405fd48def0524af033c63 to your computer and use it in GitHub Desktop.
predictions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def predict(X,Y,model): | |
m = X.shape[0] | |
res = np.zeros(m) | |
probabs, stashes = forward_pass(X,model) | |
for i in range(0,probabs.shape[0]): | |
if probabs[i][0] > 0.5: | |
res[i] = 1 | |
else: | |
res[i] = 0 | |
print("Accuracy: "+str(np.sum(res == Y)/m)) | |
return res | |
train_data_prediction = predict(x_train,y_train,model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment