diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-13 11:49:15 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-13 11:49:15 +0200 |
commit | b45d2c58ec89d2382a137d6a185aef89fd09c78c (patch) | |
tree | e21e35a7921a2bf05929a644d48420a312101a84 /lazar.rb | |
parent | a640f0029ced0d247ac768529a6c4bf9563865a4 (diff) | |
parent | 58c449915b607783738ae86f5b5d6ea2b668a0ea (diff) |
Merge branch 'development' of github.com:opentox/test into development
Diffstat (limited to 'lazar.rb')
-rw-r--r-- | lazar.rb | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |