From fbded88db8b51f41ffbd5a02f601e4538ec87258 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 14 Oct 2016 09:55:51 +0200 Subject: git commit added to model metadata --- test/descriptor.rb | 3 --- test/model-regression.rb | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'test') 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 -- cgit v1.2.3