diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-29 17:12:19 +0200 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-29 17:12:19 +0200 |
commit | ae0b071c42c37ea974aa234f30a3a8cb77aa7eb3 (patch) | |
tree | 01459087e120fde051beb0ba3f07d2de81ca9af3 /lib/ot_predictions.rb | |
parent | 3087bc25630a563ee5e3fb49702e464f8814791e (diff) |
add target variance to regression stats
Diffstat (limited to 'lib/ot_predictions.rb')
-rw-r--r-- | lib/ot_predictions.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ot_predictions.rb b/lib/ot_predictions.rb index 6d9d7bc..6e9c7a2 100644 --- a/lib/ot_predictions.rb +++ b/lib/ot_predictions.rb @@ -5,7 +5,7 @@ module Lib class OTPredictions < Predictions - CHECK_VALUES = ENV['RACK_ENV']=="test" + CHECK_VALUES = ENV['RACK_ENV'] =~ /debug|test/ def identifier(instance_index) return compound(instance_index) @@ -34,13 +34,15 @@ module Lib class_values = OpenTox::Feature.domain(prediction_feature) @compounds = test_dataset.compounds + LOGGER.debug "test dataset size: "+@compounds.size.to_s raise "test dataset is empty" unless @compounds.size>0 raise "more predicted than test compounds test:"+@compounds.size.to_s+" < prediction:"+ prediction_dataset.compounds.size.to_s if @compounds.size < prediction_dataset.compounds.size if CHECK_VALUES prediction_dataset.compounds.each do |c| - raise "predicted compound not found in test dataset" if @compounds.index(c)==nil + raise "predicted compound not found in test dataset:\n"+c+"\ntest-compounds:\n"+ + @compounds.collect{|c| c.to_s}.join("\n") if @compounds.index(c)==nil end end |