summaryrefslogtreecommitdiff
path: root/test/nanoparticles.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-10-07 13:34:22 +0200
committerChristoph Helma <helma@in-silico.ch>2016-10-07 13:34:22 +0200
commit398a59885845a49cfda4b37b7058f8a47d11c6d2 (patch)
treeba62338db6aa5d0a9c8fc4b666e445d6e94417ee /test/nanoparticles.rb
parent91787edb3682900bc5a2feeca66e5142f387fcc6 (diff)
remaining tests fixed
Diffstat (limited to 'test/nanoparticles.rb')
-rw-r--r--test/nanoparticles.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/nanoparticles.rb b/test/nanoparticles.rb
index 074a429..c489cb7 100644
--- a/test/nanoparticles.rb
+++ b/test/nanoparticles.rb
@@ -19,7 +19,7 @@ class NanoparticleTest < MiniTest::Test
prediction = model.predict nanoparticle
refute_nil prediction[:value]
assert_includes nanoparticle.dataset_ids, @training_dataset.id
- asser_true @prediction_feature.measured
+ assert true, @prediction_feature.measured
model.delete
end
@@ -39,7 +39,8 @@ class NanoparticleTest < MiniTest::Test
:prediction => {:parameters => 'pls' },
}
model = Model::Lazar.create prediction_feature: @prediction_feature, training_dataset: @training_dataset, algorithms: algorithms
- assert_equal "pls", model.algorithms[:prediction][:method]
+ assert_equal "pls", model.algorithms[:prediction][:parameters]
+ assert_equal "Algorithm::Caret.regression", model.algorithms[:prediction][:method]
cv = CrossValidation.create model
p cv.rmse
p cv.r_squared
@@ -53,7 +54,8 @@ class NanoparticleTest < MiniTest::Test
:prediction => { :parameters => 'pls' }
}
model = Model::Lazar.create prediction_feature: @prediction_feature, training_dataset: @training_dataset, algorithms: algorithms
- assert_equal "pls", model.algorithms[:prediction][:method]
+ assert_equal "pls", model.algorithms[:prediction][:parameters]
+ assert_equal "Algorithm::Caret.regression", model.algorithms[:prediction][:method]
cv = CrossValidation.create model
p cv.rmse
p cv.r_squared