summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-04 11:08:11 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-04 11:08:11 +0200
commit89790a00002069c8a6d5ea2a064cbc69f4681124 (patch)
tree8e8de3f2ed0c60ffdf4841f92a236963d4c7ff78
parent25420bc4e21568bcace3972389e4420c845598a7 (diff)
MLR tests
-rw-r--r--lazar.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lazar.rb b/lazar.rb
index b5f01e6..62a512b 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -80,6 +80,16 @@ class LazarTest < Test::Unit::TestCase
cleanup
end
+ def test_create_regression_prop_mlr_model
+ create_model :dataset_uri => @@regression_training_dataset.uri, :prediction_algorithm => "local_mlr_prop"
+ predict_compound OpenTox::Compound.from_smiles("c1ccccc1NN")
+ assert_equal 0.262.round_to(3), @predictions.first.confidence(@compounds.first).round_to(3)
+ assert_equal 123, @predictions.first.neighbors(@compounds.first).size
+ assert_equal 131, @model.features.size
+ assert_equal 0.374.round_to(3), @predictions.first.value(@compounds.first).round_to(3)
+ cleanup
+ end
+
def test_classification_model
create_model :dataset_uri => @@classification_training_dataset.uri
puts @model.uri