diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-04-14 19:43:24 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-04-14 19:43:24 +0200 |
commit | 753fcc204d93d86c76860bee6e2f7d0468c3c940 (patch) | |
tree | 30fc9980de8b298ee57199c9b540408019a8976c /test/classification.rb | |
parent | 64f1f32ced77afb278bdb7c27397c5299a73675c (diff) |
features/toxicities fixed
Diffstat (limited to 'test/classification.rb')
-rw-r--r-- | test/classification.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/classification.rb b/test/classification.rb index af23db6..7412714 100644 --- a/test/classification.rb +++ b/test/classification.rb @@ -30,14 +30,14 @@ class LazarClassificationTest < MiniTest::Test # make a dataset prediction compound_dataset = OpenTox::Dataset.from_csv_file File.join(DATA_DIR,"EPAFHM.mini.csv") - prediction = model.predict compound_dataset - assert_equal compound_dataset.compounds, prediction.compounds + prediction_dataset = model.predict compound_dataset + assert_equal compound_dataset.compounds, prediction_dataset.compounds - cid = prediction.compounds[7].id.to_s - assert_equal "Could not find similar compounds with experimental data in the training dataset.", prediction.predictions[cid][:warning] - cid = prediction.compounds[9].id.to_s - assert_equal "1 compounds have been removed from neighbors, because they have the same structure as the query compound.", prediction.predictions[cid][:warning] + cid = prediction_dataset.compounds[7].id.to_s + assert_equal "Could not find similar compounds with experimental data in the training dataset.", prediction_dataset.predictions[cid][:warning] + cid = prediction_dataset.compounds[9].id.to_s + assert_equal "1 compounds have been removed from neighbors, because they have the same structure as the query compound.", prediction_dataset.predictions[cid][:warning] # cleanup - [training_dataset,model,compound_dataset].each{|o| o.delete} + [training_dataset,model,compound_dataset,prediction_dataset].each{|o| o.delete} end end |