diff options
-rw-r--r-- | lazar.rb | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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 |