summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2011-12-08 15:10:45 +0100
committerdavor <vorgrimmlerdavid@gmx.de>2011-12-08 15:10:45 +0100
commit9ff0d15e33f836f31cc43e545a6e78f782622b3e (patch)
treecf12dc1139976d7deef64542e2af2638f98b24dd
parent5212f57c0dc6b8c5a7fa98b3e06eecd8bb5b4513 (diff)
Updated test to commit 3115539653ac01f703492d632c1d1adbc8ab5cee
-rw-r--r--lazar.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lazar.rb b/lazar.rb
index be550c0..b6d1b89 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -62,7 +62,6 @@ class LazarTest < Test::Unit::TestCase
=begin
=end
-
### Regression
#
# Nominal / Ordinal Features
@@ -78,12 +77,12 @@ 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_in_delta @predictions.first.value(@compounds.first), 0.15, 0.2
+ assert_in_delta @predictions.first.value(@compounds.first), 0.35, 0.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")
@@ -97,8 +96,8 @@ class LazarTest < Test::Unit::TestCase
def test_create_regression_prop_pc_model
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_in_delta @predictions.first.confidence(@compounds.first), 0.45, 0.03
+ assert_in_delta @predictions.first.value(@compounds.first), 0.35, 0.1
+ assert_in_delta @predictions.first.confidence(@compounds.first), 0.38, 0.03
assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
cleanup
@@ -107,15 +106,14 @@ 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_in_delta @predictions.first.confidence(@compounds.first), 0.45, 0.03
- assert_in_delta @predictions.first.value(@compounds.first), 0.76, 0.03
+ assert_in_delta @predictions.first.confidence(@compounds.first), 0.38, 0.03
+ assert_in_delta @predictions.first.value(@compounds.first), 0.57, 0.03
assert_equal 253, @predictions.first.neighbors(@compounds.first).size
assert_equal 131, @model.features.size
end
-
### Classification
## Nominal / Ordinal Features