From fd6cccaecc235bfe334fd54b79f02e2083dc89a9 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Mon, 7 Jun 2010 14:09:43 +0200 Subject: add regression plot, rescue not found errors, .. --- report/plot_factory.rb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'report/plot_factory.rb') 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?) -- cgit v1.2.3