在h2o框架下实现MAPE的正确方法是什么?
我有兴趣将下面的函数转换为h2o概念
def mape(a, b):
mask = a <> 0
return (np.fabs(a - b)/a)[mask].mean()发布于 2017-03-29 20:11:18
import h2o
h2o.init()
df = h2o.create_frame(rows=100, cols=2, missing_fraction=0, integer_fraction=1, integer_range=5)
print(df)
def mape(a, b):
mask = a != 0
return (abs(a-b)/a)[mask].mean()
mape(df[0],df[1])https://stackoverflow.com/questions/43103022
复制相似问题