summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vorgrimmler <vorgrimmlerdavid@gmx.de>2011-09-19 16:02:06 +0200
committerDavid Vorgrimmler <vorgrimmlerdavid@gmx.de>2011-09-19 16:02:06 +0200
commit6ae5229e5a6c7e94e82cf3a11f8d76b80f4a36ef (patch)
tree215acd83f508aab524f1016e89f97c1c1510d743
parent5bf775db23ea77687dab659c8d7fcbdad1822b81 (diff)
Changed regression results to new results with nr_hits.
-rw-r--r--lazar.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lazar.rb b/lazar.rb
index 57f6842..b241b5c 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 0.93.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