提交 5e9ca07a authored 作者: Frederic Bastien's avatar Frederic Bastien

print the max, mean, median, std absolute diff when debug mode see a difference in value.

上级 22bfa3b0
...@@ -166,6 +166,11 @@ class BadOptimization(DebugModeError): ...@@ -166,6 +166,11 @@ class BadOptimization(DebugModeError):
else: else:
print >> sio, " New Value: ", str(self.new_r_val) print >> sio, " New Value: ", str(self.new_r_val)
print >> sio, " Max Abs Diff: ", numpy.max(numpy.absolute(self.new_r_val-self.old_r_val))
print >> sio, " Mean Abs Diff: ", numpy.mean(numpy.absolute(self.new_r_val-self.old_r_val))
print >> sio, " Median Abs Diff: ", numpy.median(numpy.absolute(self.new_r_val-self.old_r_val))
print >> sio, " Std Abs Diff: ", numpy.std(numpy.absolute(self.new_r_val-self.old_r_val))
print >> sio, " Reason: ", str(self.reason) print >> sio, " Reason: ", str(self.reason)
print >> sio, " Old Graph:" print >> sio, " Old Graph:"
print >> sio, self.old_graph print >> sio, self.old_graph
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论