Skip to content

Commit

Permalink
Update loss_func.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kwanit1142 authored Apr 8, 2021
1 parent d8e537b commit 4d97dcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MLlib/loss_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,5 @@ def loss(X, Y, W):
"""

y_pred = np.dot(X, W).T
return np.sum(np.true_divide((np.abs(Y - y_pred) * 100), Y)) / X.shape[0]
L = np.sum(np.true_divide((np.abs(Y - y_pred) * 100), Y)) / X.shape[0]
return L

0 comments on commit 4d97dcc

Please sign in to comment.