summaryrefslogtreecommitdiff
path: root/report/plot_factory.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2010-06-07 14:09:43 +0200
committermguetlein <martin.guetlein@gmail.com>2010-06-07 14:09:43 +0200
commitfd6cccaecc235bfe334fd54b79f02e2083dc89a9 (patch)
tree188895a5ba743bfd321d914b399bf90124734057 /report/plot_factory.rb
parentedfa159a81f02f3bfbbd5108ff3494369133e072 (diff)
add regression plot, rescue not found errors, ..
Diffstat (limited to 'report/plot_factory.rb')
-rw-r--r--report/plot_factory.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/report/plot_factory.rb b/report/plot_factory.rb
index e1fefeb..daaba52 100644
--- a/report/plot_factory.rb
+++ b/report/plot_factory.rb
@@ -13,7 +13,23 @@ end
module Reports
- module PlotFactory
+ module PlotFactory
+
+ def self.create_regression_plot( out_file, validation_set )
+
+ LOGGER.debug "Creating regression plot, out-file:"+out_file.to_s
+
+ names = []
+ x = []
+ y = []
+ validation_set.validations.each do |v|
+ names << v.algorithm_uri
+ x << v.get_predictions.predicted_values
+ y << v.get_predictions.actual_values
+ end
+
+ RubyPlot::plot_points(out_file, "Regression plot", "Predicted values", "Actual values", names, x, y )
+ end
# creates a roc plot (result is plotted into out_file)
# * if (split_set_attributes == nil?)