diff options
author | Christoph Helma <helma@in-silico.ch> | 2019-08-19 15:28:44 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2019-08-19 15:28:44 +0200 |
commit | 15f093eee66597b0b4a4defa7d8645a3e13372a0 (patch) | |
tree | 19da2771f88bbb3c77d2c6905a0c4b1694bf5620 /test/regression-validation.rb | |
parent | a43af9e1d26d564fdbcf089977908a19299acd5a (diff) | |
parent | 488ce9fe6d4b715680675861105b8c52a7535140 (diff) |
Merge branch 'development' of ssh://git.in-silico.ch:2222/home/ist/public/lazar into developmentdevelopment
Diffstat (limited to 'test/regression-validation.rb')
-rw-r--r-- | test/regression-validation.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/regression-validation.rb b/test/regression-validation.rb index 65bec63..9a2da8f 100644 --- a/test/regression-validation.rb +++ b/test/regression-validation.rb @@ -86,6 +86,23 @@ class RegressionValidationTest < MiniTest::Test repeated_cv.crossvalidations.each do |cv| assert cv.r_squared[:all] > 0.34, "R^2 (#{cv.r_squared[:all]}) should be larger than 0.34" assert cv.rmse[:all] < 1.5, "RMSE (#{cv.rmse[:all]}) should be smaller than 0.5" +=begin + #actually some values can be 0 or nil depending on the random folds in this small dataset + keys = cv.rmse.keys + types = ["rmse", \ + "r_squared", \ + "mae", \ + "nr_predictions", \ + "within_prediction_interval", \ + "out_of_prediction_interval" + ] + types.each do |type| + keys.each do |key| + refute_nil cv[type][key] + assert cv[type][key] > 0 + end + end +=end end end |