diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-04-28 08:11:12 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-04-28 08:11:12 +0200 |
commit | 32d767ee7cfcc19337892551906950621f348174 (patch) | |
tree | 20b1f34e933f4f4fec053db6daeeaa99feebf993 /test/nanoparticles.rb | |
parent | cfc64a2966ab38698e499f0b44f41208ee77a07f (diff) |
nanoparticle crossvalidation technically working
Diffstat (limited to 'test/nanoparticles.rb')
-rw-r--r-- | test/nanoparticles.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/nanoparticles.rb b/test/nanoparticles.rb index 31bb903..46c6620 100644 --- a/test/nanoparticles.rb +++ b/test/nanoparticles.rb @@ -60,7 +60,15 @@ class NanoparticleTest < MiniTest::Test prediction = model.predict nanoparticle p prediction #p prediction - #refute_nil prediction[:value] + refute_nil prediction[:value] + end + + 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"}) + cv = RegressionCrossValidation.create model + p cv end end |