added simplified improvement test

This commit is contained in:
Stephen McQuay 2011-05-18 12:57:09 -06:00
parent dc15bd17bb
commit 5509ef5b96

View File

@ -65,7 +65,11 @@ def improved_answer(answer, exact):
else: else:
log.debug(":( damaged result") log.debug(":( damaged result")
return False return False
def improved(qlin, err, final, exact):
if np.abs(final - exact) <= np.abs(qlin - exact):
return True
else:
return False
def percent_improvement(answer, exact): def percent_improvement(answer, exact):
return np.abs(answer['error']) / exact return np.abs(answer['error']) / exact