Skip to content

Conversation

t-decao
Copy link
Collaborator

@t-decao t-decao commented Jul 14, 2020

No description provided.

f'MAPE {va[0]:7.3%}, {te[0]:7.3%}; '
f'MAE {va[1]:4.3f}, {te[1]:4.3f}; '
f'RMSE {va[2]:6.3f}, {te[2]:6.3f}.')
te = evl[ix*3:ix*3 + 3]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not te = evl[ix]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在ix是全部的,但是evl是n*3的

@@ -41,7 +77,7 @@ def MAPE(v, v_):
:param v_: np.ndarray or int, prediction.
:return: int, MAPE averages on all elements of input.
'''
return np.mean(np.abs((v_ - v) / v))
return np.abs(np.mean(np.abs(v_ - v) / v))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么abs还是没有扩到分母,np.abs((v_ - v) / v)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants