MCPcopy Create free account
hub / github.com/kwuking/TimeMixer / MAPE

Function MAPE

utils/metrics.py:26–29  ·  view source on GitHub ↗
(pred, true)

Source from the content-addressed store, hash-verified

24
25
26def MAPE(pred, true):
27 mape = np.abs((pred - true) / true)
28 mape = np.where(mape > 5, 0, mape)
29 return np.mean(mape)
30
31
32def MSPE(pred, true):

Callers 1

metricFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected