diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-05-12 15:23:01 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-05-12 15:23:01 +0200 |
commit | b8bb12c8a163c238d7d4387c1914e2100bb660df (patch) | |
tree | 791d1524e2294d8a3a38658607a644d7576784ae /test/nanoparticles.rb | |
parent | 937bfbaf058aea5973927cb3bf6b51028b312ed9 (diff) |
enm study import fixed
Diffstat (limited to 'test/nanoparticles.rb')
-rw-r--r-- | test/nanoparticles.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/nanoparticles.rb b/test/nanoparticles.rb index 2082ec4..e1b8788 100644 --- a/test/nanoparticles.rb +++ b/test/nanoparticles.rb @@ -35,13 +35,22 @@ class NanoparticleTest < MiniTest::Test def test_validate_model training_dataset = Dataset.find_or_create_by(:name => "Protein Corona Fingerprinting Predicts the Cellular Interaction of Gold and Silver Nanoparticles") feature = Feature.find_or_create_by(name: "7.99 Toxicity (other) ICP-AES", category: "TOX", unit: "mL/ug(Mg)") - #model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_physchem_regression", :neighbor_algorithm => "nanoparticle_neighbors"}) model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_weighted_average", :neighbor_algorithm => "nanoparticle_neighbors"}) p model cv = RegressionCrossValidation.create model p cv end + def test_validate_pls_model + training_dataset = Dataset.find_or_create_by(:name => "Protein Corona Fingerprinting Predicts the Cellular Interaction of Gold and Silver Nanoparticles") + feature = Feature.find_or_create_by(name: "7.99 Toxicity (other) ICP-AES", category: "TOX", unit: "mL/ug(Mg)") + model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_physchem_regression", :neighbor_algorithm => "nanoparticle_neighbors"}) + #model = Model::LazarRegression.create(feature, training_dataset, {:prediction_algorithm => "OpenTox::Algorithm::Regression.local_weighted_average", :neighbor_algorithm => "nanoparticle_neighbors"}) + p model + cv = RegressionCrossValidation.create model + p cv + end + def test_export skip Dataset.all.each do |d| |