Skip to content

Commit

Permalink
add some tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Normoyle committed Mar 6, 2015
1 parent 7f7f077 commit c3f6ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions py/h2o_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def createIgnoredCols(key, cols, response):
# example:
# h2o_cmd.runScore(dataKey=scoreDataKey, modelKey=modelKey, vactual=y, vpredict=1, expectedAuc=0.5)
def runScore(node=None, dataKey=None, modelKey=None, predictKey='Predict.hex',
vactual='C1', vpredict=1, expectedAuc=None, doAUC=True, timeoutSecs=200):
vactual='C1', vpredict=1, expectedAuc=None, expectedAucTol=0.15, doAUC=True, timeoutSecs=200):
# Score *******************************
# this messes up if you use case_mode/case_vale above
predictKey = 'Predict.hex'
Expand All @@ -513,7 +513,7 @@ def runScore(node=None, dataKey=None, modelKey=None, predictKey='Predict.hex',
auc = resultAUC['aucdata']['AUC']

if expectedAuc:
h2o_util.assertApproxEqual(auc, expectedAuc, tol=0.15,
h2o_util.assertApproxEqual(auc, expectedAuc, tol=expectedAucTol,
msg="actual auc: %s not close enough to %s" % (auc, expectedAuc))

# don't do this unless binomial
Expand Down
2 changes: 1 addition & 1 deletion py/testdir_single_jvm/test_GLM2_ints_unbalanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_GLM2_ints_unbalanced(self):
timeoutSecs=30, separator=colSepInt)

h2o_cmd.runScore(dataKey="B.hex", modelKey=modelKey,
vactual='C' + str(y+1), vpredict=1, expectedAuc=0.45)
vactual='C' + str(y+1), vpredict=1, expectedAuc=0.50, expectedAucTol=0.20)


if __name__ == '__main__':
Expand Down

0 comments on commit c3f6ce9

Please sign in to comment.