summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-10-14 09:55:51 +0200
committerChristoph Helma <helma@in-silico.ch>2016-10-14 09:55:51 +0200
commitfbded88db8b51f41ffbd5a02f601e4538ec87258 (patch)
tree82ce46019ad490bef7547f7a67e40fc0b2bbd8e7 /test
parent09452bba5c407c27721223d126e3f45c12b20a0c (diff)
git commit added to model metadata
Diffstat (limited to 'test')
-rw-r--r--test/descriptor.rb3
-rw-r--r--test/model-regression.rb3
2 files changed, 2 insertions, 4 deletions
diff --git a/test/descriptor.rb b/test/descriptor.rb
index 911f5c3..e5d8ff9 100644
--- a/test/descriptor.rb
+++ b/test/descriptor.rb
@@ -26,7 +26,6 @@ class DescriptorTest < MiniTest::Test
def test_compound_openbabel_single
c = OpenTox::Compound.from_smiles "CC(=O)CC(C)C#N"
- PhysChem.openbabel_descriptors # required for descriptor initialisation, TODO: move into libs
feature = PhysChem.find_or_create_by(:name => "Openbabel.logP")
result = c.calculate_properties([feature])
assert_equal 1.12518, result.first.round(5)
@@ -34,7 +33,6 @@ class DescriptorTest < MiniTest::Test
end
def test_compound_cdk_single
- PhysChem.cdk_descriptors # required for descriptor initialisation, TODO: move into libs
c = OpenTox::Compound.from_smiles "c1ccccc1"
feature = PhysChem.find_or_create_by(:name => "Cdk.AtomCount.nAtom")
result = c.calculate_properties([feature])
@@ -50,7 +48,6 @@ class DescriptorTest < MiniTest::Test
end
def test_compound_joelib_single
- PhysChem.joelib_descriptors # required for descriptor initialisation, TODO: move into libs
c = OpenTox::Compound.from_smiles "CC(=O)CC(C)C#N"
result = c.calculate_properties [PhysChem.find_or_create_by(:name => "Joelib.LogP")]
assert_equal 2.65908, result.first
diff --git a/test/model-regression.rb b/test/model-regression.rb
index 644ca1c..86b927c 100644
--- a/test/model-regression.rb
+++ b/test/model-regression.rb
@@ -122,7 +122,6 @@ class LazarRegressionTest < MiniTest::Test
assert_equal algorithms[:descriptors], model.algorithms[:descriptors]
prediction = model.predict training_dataset.substances[10]
refute_nil prediction[:value]
- # TODO test predictin
end
def test_regression_with_feature_selection
@@ -138,6 +137,8 @@ class LazarRegressionTest < MiniTest::Test
assert_equal "Algorithm::Similarity.tanimoto", model.algorithms[:similarity][:method]
assert_equal 0.1, model.algorithms[:similarity][:min]
assert_equal algorithms[:feature_selection][:method], model.algorithms[:feature_selection][:method]
+ prediction = model.predict training_dataset.substances[10]
+ refute_nil prediction[:value]
end
def test_regression_parameters