Skip to content
Snippets Groups Projects
Commit 49c0f100 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[test_trainer] Relax test constraints on closeness (new libsvm 3.24)

parent f59d0af1
No related branches found
No related tags found
1 merge request!10Fix precision test to be a bit softer on floating-point comparisons
Pipeline #35972 failed
...@@ -135,7 +135,7 @@ def test_training(): ...@@ -135,7 +135,7 @@ def test_training():
curr_scores = numpy.array(curr_scores) curr_scores = numpy.array(curr_scores)
prev_scores = numpy.array(prev_scores) prev_scores = numpy.array(prev_scores)
_check_abs_diff(curr_scores, prev_scores, 1e-8) _check_abs_diff(curr_scores, prev_scores, 5e-7)
def test_training_with_probability(): def test_training_with_probability():
...@@ -171,7 +171,7 @@ def test_training_with_probability(): ...@@ -171,7 +171,7 @@ def test_training_with_probability():
curr_scores = numpy.array(curr_scores) curr_scores = numpy.array(curr_scores)
prev_scores = numpy.array(prev_scores) prev_scores = numpy.array(prev_scores)
_check_abs_diff(curr_scores, prev_scores, 1e-8) _check_abs_diff(curr_scores, prev_scores, 5e-7)
# check probabilities -- probA and probB do not get the exact same values # check probabilities -- probA and probB do not get the exact same values
# as when using libsvm's svm-train.c. The reason may lie in the order in # as when using libsvm's svm-train.c. The reason may lie in the order in
...@@ -217,7 +217,7 @@ def test_training_one_class(): ...@@ -217,7 +217,7 @@ def test_training_one_class():
curr_scores = numpy.array(curr_scores) curr_scores = numpy.array(curr_scores)
prev_scores = numpy.array(prev_scores) prev_scores = numpy.array(prev_scores)
_check_abs_diff(curr_scores, prev_scores) _check_abs_diff(curr_scores, prev_scores, 5e-7)
def test_successive_training(): def test_successive_training():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment