summaryrefslogtreecommitdiff
path: root/lazar.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-05-12 19:19:46 +0200
committerChristoph Helma <helma@in-silico.ch>2011-05-12 19:19:46 +0200
commit58c449915b607783738ae86f5b5d6ea2b668a0ea (patch)
tree7c4c7919b43868a85fbe7223b4d050092bc13407 /lazar.rb
parentd2ca1d714686a23e9e27c9f2845de6cc03f12b73 (diff)
test fixed for linear fragments in regression bbrc
Diffstat (limited to 'lazar.rb')
-rw-r--r--lazar.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lazar.rb b/lazar.rb
index e2dd12a..eb8b99e 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -26,17 +26,16 @@ class LazarTest < Test::Unit::TestCase
model_uri = OpenTox::Algorithm::Lazar.new.run({:dataset_uri => @@regression_training_dataset.uri, :subjectid => @@subjectid}).to_s
lazar = OpenTox::Model::Lazar.find model_uri, @@subjectid
@models << lazar
- assert_equal 1356, lazar.features.size
+ assert_equal 185, lazar.features.size
compound = OpenTox::Compound.from_smiles("c1ccccc1NN")
prediction_uri = lazar.run(:compound_uri => compound.uri, :subjectid => @@subjectid).to_s
prediction = OpenTox::LazarPrediction.find(prediction_uri, @@subjectid)
@predictions << prediction
- assert_equal prediction.value(compound).round_to(4), 0.17.round_to(4)
- assert_equal prediction.confidence(compound).round_to(4), 0.5697.round_to(4)
- assert_equal prediction.neighbors(compound).size, 77
+ assert_equal prediction.value(compound).round_to(4), 0.3469.round_to(4)
+ assert_equal prediction.confidence(compound).round_to(4), 0.3223.round_to(4)
+ assert_equal prediction.neighbors(compound).size, 73
end
-
def test_classification_model
# create model