summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2011-12-05 16:51:23 +0100
committerdavor <vorgrimmlerdavid@gmx.de>2011-12-05 16:51:23 +0100
commitd45afcc81db71801773eeb68b0de1417ae28e478 (patch)
treee98d515cb3beeae9a87e642af47ebcea9c709391
parentffee34c9ec0cc35db3a6a21f4014a6f81ed150c4 (diff)
Updated test values
-rw-r--r--lazar.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lazar.rb b/lazar.rb
index ae3ef4b..be550c0 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -98,7 +98,7 @@ class LazarTest < Test::Unit::TestCase
create_model :dataset_uri => @@regression_training_dataset.uri, :local_svm_kernel => "propositionalized", :pc_type => "electronic"
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
assert_in_delta @predictions.first.value(@compounds.first), 0.53, 0.1
- assert_equal 0.453.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_in_delta @predictions.first.confidence(@compounds.first), 0.45, 0.03
assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
cleanup
@@ -107,8 +107,8 @@ class LazarTest < Test::Unit::TestCase
def test_regression_mlr_prop_pc_model
create_model :dataset_uri => @@regression_training_dataset.uri, :prediction_algorithm => "local_mlr_prop", :pc_type => "electronic"
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
- assert_equal 0.45, @predictions.first.confidence(@compounds.first).round_to(2)
- assert_equal 0.76, @predictions.first.value(@compounds.first).round_to(2)
+ assert_in_delta @predictions.first.confidence(@compounds.first), 0.45, 0.03
+ assert_in_delta @predictions.first.value(@compounds.first), 0.76, 0.03
assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
end