Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher192 committed Nov 14, 2023
1 parent 9f5aec8 commit f866e73
Show file tree
Hide file tree
Showing 2 changed files with 613 additions and 64 deletions.
8 changes: 7 additions & 1 deletion helper_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,10 @@ def plot_prediction(train_data, train_label, test_data, test_label, prediction =
if predictions is not None:
plt.scatter(test_data, prediction, c = "r", s = 4, label = "Prediction")

plt.legend(prop = {"size" : 14})
plt.legend(prop = {"size" : 14})

def accuracy_function(y_true, y_pred):
correct = torch.eq(y_true, y_pred).sum().item()
acc = (correct / len(y_pred)) * 100

return acc
Loading

0 comments on commit f866e73

Please sign in to comment.