summaryrefslogtreecommitdiff
path: root/lazar.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-09-23 12:29:39 +0200
committermr <mr@mrautenberg.de>2011-09-23 12:29:39 +0200
commit32856dc0fcba2751c2f4d8a1162a958f10af3250 (patch)
tree841561eae04cdfa520b7b7456f1553d3409f1145 /lazar.rb
parent878f522af1d1ac2f132c5b6adb0deacdbd19cfa8 (diff)
parent6aef4de474e420e45fa6e84d440851fe73db1167 (diff)
Merge branch 'release/v3.0.0'v3.0.0
Diffstat (limited to 'lazar.rb')
-rw-r--r--lazar.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lazar.rb b/lazar.rb
index 57f6842..a46e2f2 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -65,17 +65,17 @@ class LazarTest < Test::Unit::TestCase
def test_create_regression_model
create_model :dataset_uri => @@regression_training_dataset.uri
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
- assert_equal 0.421.round_to(2), @predictions.first.value(@compounds.first).round_to(2)
- assert_equal 0.262.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
- assert_equal 123, @predictions.first.neighbors(@compounds.first).size
+ assert_equal 1.09.round_to(2), @predictions.first.value(@compounds.first).round_to(2)
+ assert_equal 0.453.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_equal 253, @predictions.first.neighbors(@compounds.first).size
cleanup
end
def test_create_regression_prop_model
create_model :dataset_uri => @@regression_training_dataset.uri, :local_svm_kernel => "propositionalized"
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
- assert_equal 0.262.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
- assert_equal 123, @predictions.first.neighbors(@compounds.first).size
+ assert_equal 0.453.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
cleanup
end
@@ -149,18 +149,18 @@ class LazarTest < Test::Unit::TestCase
def test_regression_mlr_prop_model
create_model :dataset_uri => @@regression_training_dataset.uri, :prediction_algorithm => "local_mlr_prop"
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
- assert_equal 0.262, @predictions.first.confidence(@compounds.first).round_to(3)
- assert_equal 0.168, @predictions.first.value(@compounds.first).round_to(3)
- assert_equal 123, @predictions.first.neighbors(@compounds.first).size
+ assert_equal 0.453, @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_equal 0.265, @predictions.first.value(@compounds.first).round_to(3)
+ assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
end
def test_regression_mlr_prop_conf_stdev
create_model :dataset_uri => @@regression_training_dataset.uri, :prediction_algorithm => "local_mlr_prop", :conf_stdev => "true"
predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
- assert_equal 0.056, @predictions.first.confidence(@compounds.first).round_to(3)
- assert_equal 0.168, @predictions.first.value(@compounds.first).round_to(3)
- assert_equal 123, @predictions.first.neighbors(@compounds.first).size
+ assert_equal 0.154, @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_equal 0.265, @predictions.first.value(@compounds.first).round_to(3)
+ assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
end