diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-04-26 17:38:15 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-04-26 17:38:15 +0200 |
commit | cfc64a2966ab38698e499f0b44f41208ee77a07f (patch) | |
tree | 408d4518e808a3e52a96e9e68cfe0723404dbf8b /test/validation.rb | |
parent | 6890687df6de0a6eaa3d35c6be66639614ea2ef2 (diff) |
first nanomaterial prediction
Diffstat (limited to 'test/validation.rb')
-rw-r--r-- | test/validation.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/validation.rb b/test/validation.rb index baee2d1..cbc7d09 100644 --- a/test/validation.rb +++ b/test/validation.rb @@ -9,6 +9,7 @@ class ValidationTest < MiniTest::Test model = Model::LazarClassification.create dataset.features.first, dataset cv = ClassificationCrossValidation.create model assert cv.accuracy > 0.7, "Accuracy (#{cv.accuracy}) should be larger than 0.7, this may occur due to an unfavorable training/test set split" + assert cv.weighted_accuracy > cv.accuracy, "Weighted accuracy (#{cv.weighted_accuracy}) should be larger than accuracy (#{cv.accuracy})." end def test_default_regression_crossvalidation @@ -85,6 +86,7 @@ class ValidationTest < MiniTest::Test assert_equal 14, loo.nr_unpredicted refute_empty loo.confusion_matrix assert loo.accuracy > 0.77 + assert loo.weighted_accuracy > loo.accuracy, "Weighted accuracy (#{loo.weighted_accuracy}) should be larger than accuracy (#{loo.accuracy})." end def test_regression_loo_validation |