From e7787778a9c307e8ca2400d7d296a9f7880b41ab Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 23 Feb 2012 16:07:26 +0100 Subject: Adjusted tests to jl --- dataset.rb | 7 ------- lazar.rb | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/dataset.rb b/dataset.rb index 6d17756..8cf384a 100644 --- a/dataset.rb +++ b/dataset.rb @@ -29,13 +29,6 @@ class DatasetTest < Test::Unit::TestCase #@new_dataset.delete end -# def test_get_pc -# ds_uri = OpenTox::RestClientWrapper.post(CONFIG[:services]["opentox-dataset"], {:file => File.new("data/EPAFHM.csv")} ,{:accept => "text/uri-list", :subjectid => @@subjectid}).to_s.chomp -# puts "DS: #{ds_uri}" -# fds_uri = OpenTox::Algorithm.pc_descriptors( { :dataset_uri => ds_uri, :pc_type => "constitutional" } ) -# puts "FDS: #{fds_uri}" -# end - def test_save_external @dataset = OpenTox::Dataset.find "http://apps.ideaconsult.net:8080/ambit2/dataset/2698" diff --git a/lazar.rb b/lazar.rb index 4a77a82..bf2baf0 100644 --- a/lazar.rb +++ b/lazar.rb @@ -65,9 +65,9 @@ class LazarTest < Test::Unit::TestCase def test_create_regression_svm_pc_model create_model :dataset_uri => @@regression_training_dataset.uri, :feature_dataset_uri => @@regression_feature_dataset.uri, :pc_type => "constitutional" predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN") - assert_in_delta @predictions.first.value(@compounds.first), 7.8, 0.1 - assert_equal 0.603, @predictions.first.confidence(@compounds.first).round_to(3) - assert_equal 74, @predictions.first.neighbors(@compounds.first).size + assert_in_delta @predictions.first.value(@compounds.first), 12.81, 0.1 + assert_equal 0.531, @predictions.first.confidence(@compounds.first).round_to(3) + assert_equal 91, @predictions.first.neighbors(@compounds.first).size cleanup end -- cgit v1.2.3