From 6d81c4cd94335864514964756d908641b5aef28f Mon Sep 17 00:00:00 2001 From: mguetlein Date: Thu, 18 Aug 2011 17:16:21 +0200 Subject: adding tttestable attributes list --- report/report_application.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/report/report_application.rb b/report/report_application.rb index b96fb27..5fec6d1 100755 --- a/report/report_application.rb +++ b/report/report_application.rb @@ -50,6 +50,10 @@ get '/report/?' do end end +def wrap(s, width=78) + s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n") +end + get '/report/:report_type' do perform do |rs| case request.env['HTTP_ACCEPT'].to_s @@ -60,8 +64,15 @@ get '/report/:report_type' do "Crossvalidations: "+url_for("/crossvalidation",:full) description = "A list of all "+params[:report_type]+" reports. To create a report, use the POST method." + if params[:report_type]=="algorithm_comparison" + description += "\n\nThis report can be used to compare the validation results of different algorithms that have been validated on the same dataset." + description += "\nThe following attributes can be compared with the t-test:" + description += "\n\n* All validation types:\n"+wrap((Validation::VAL_PROPS_SUM+Validation::VAL_PROPS_AVG).join(", "),120) + description += "\n* Classification validations:\n"+wrap(Validation::VAL_CLASS_PROPS.join(", "),120) + description += "\n* Regresssion validations:\n"+wrap(Validation::VAL_REGR_PROPS.join(", "),120) + end + post_params = [[:validation_uris]] - post_command = OpenTox::PostCommand.new request.url,"Create validation report" val_uri_description = params[:report_type]=="algorithm_comparison" ? "Separate multiple uris with ','" : nil # trick for easy report creation -- cgit v1.2.3