diff options
author | gebele <gebele@in-silico.ch> | 2016-11-10 11:07:03 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2016-11-10 11:07:03 +0000 |
commit | 347ef2891876af871e101f9a9efc643e5f28da4c (patch) | |
tree | 508a3f0fcfeb4fa934f703adbdf9b0aee2954ece /test/validation-classification.rb | |
parent | 295dcfc74e1375e495ec3d9c1e74a402eb4decd4 (diff) | |
parent | 7bd244b35d2e2059baf1fa535dca854999b5da75 (diff) |
Merge branch 'development' of https://github.com/opentox/lazar into development
Diffstat (limited to 'test/validation-classification.rb')
-rw-r--r-- | test/validation-classification.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/validation-classification.rb b/test/validation-classification.rb index c93e71f..fb4c3e7 100644 --- a/test/validation-classification.rb +++ b/test/validation-classification.rb @@ -11,8 +11,10 @@ class ValidationClassificationTest < MiniTest::Test 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})." - #p cv - #File.open("tmp.pdf","w+"){|f| f.puts cv.probability_plot} + File.open("/tmp/tmp.pdf","w+"){|f| f.puts cv.probability_plot(format:"pdf")} + p `file -b /tmp/tmp.pdf` + File.open("/tmp/tmp.png","w+"){|f| f.puts cv.probability_plot(format:"png")} + p `file -b /tmp/tmp.png` end # parameters |