diff options
author | helma@in-silico.ch <helma@in-silico.ch> | 2018-11-16 22:17:55 +0100 |
---|---|---|
committer | helma@in-silico.ch <helma@in-silico.ch> | 2018-11-16 22:17:55 +0100 |
commit | c12d5bb40ab2a0783f755c3238a20448b9a5a42e (patch) | |
tree | 90d1f9a4bd5113776224cc05c1b285ab9c2875d8 /test/regression-validation.rb | |
parent | 0882c2cd0de934d7377fc9d08c306be98612c88a (diff) |
minor test fixes
Diffstat (limited to 'test/regression-validation.rb')
-rw-r--r-- | test/regression-validation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/regression-validation.rb b/test/regression-validation.rb index 7dbe354..65bec63 100644 --- a/test/regression-validation.rb +++ b/test/regression-validation.rb @@ -12,7 +12,7 @@ class RegressionValidationTest < MiniTest::Test cv = RegressionCrossValidation.create model assert cv.rmse[:all] < 1.5, "RMSE #{cv.rmse[:all]} should be smaller than 1.5, this may occur due to unfavorable training/test set splits" assert cv.mae[:all] < 1.1, "MAE #{cv.mae[:all]} should be smaller than 1.1, this may occur due to unfavorable training/test set splits" - assert cv.within_prediction_interval[:all]/cv.nr_predictions[:all] > 0.8, "Only #{(100*cv.within_prediction_interval[:all]/cv.nr_predictions[:all]).round(2)}% of measurement within prediction interval. This may occur due to unfavorable training/test set splits" + assert cv.within_prediction_interval[:all]/cv.nr_predictions[:all].to_f > 0.8, "Only #{(100.0*cv.within_prediction_interval[:all]/cv.nr_predictions[:all]).round(2)}% of measurement within prediction interval. This may occur due to unfavorable training/test set splits" end # parameters |