diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-11-08 16:04:49 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-11-08 16:04:49 +0100 |
commit | c6e86fc1bfee7cb91782dd7067408d78a8e48ed9 (patch) | |
tree | f5c2c04d8a30e68180ef0114f02e95169e89483b /lib/validation-statistics.rb | |
parent | 280f81dcffb3b8b929ff9cbe92ba17403f5a9dd3 (diff) |
probability plot for classification
Diffstat (limited to 'lib/validation-statistics.rb')
-rw-r--r-- | lib/validation-statistics.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/validation-statistics.rb b/lib/validation-statistics.rb index 799bb34..b6f8a60 100644 --- a/lib/validation-statistics.rb +++ b/lib/validation-statistics.rb @@ -66,8 +66,13 @@ module OpenTox end def probability_plot format: "pdf" - unless probability_plot_id - tmpfile = "/tmp/#{id.to_s}_probability.#{format}" + #unless probability_plot_id + + #tmpdir = File.join(ENV["HOME"], "tmp") + tmpdir = "/tmp" + #p tmpdir + FileUtils.mkdir_p tmpdir + tmpfile = File.join(tmpdir,"#{id.to_s}_probability.#{format}") accuracies = [] probabilities = [] correct_predictions = 0 @@ -91,7 +96,7 @@ module OpenTox file = Mongo::Grid::File.new(File.read(tmpfile), :filename => "#{self.id.to_s}_probability_plot.svg") plot_id = $gridfs.insert_one(file) update(:probability_plot_id => plot_id) - end + #end $gridfs.find_one(_id: probability_plot_id).data end end @@ -139,7 +144,6 @@ module OpenTox :mae => mae, :rmse => rmse, :r_squared => r_squared, - :r_squared_adjusted => r_squared_adjusted, :within_prediction_interval => within_prediction_interval, :out_of_prediction_interval => out_of_prediction_interval, } |