diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-08-18 17:16:21 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-08-18 17:16:21 +0200 |
commit | 6d81c4cd94335864514964756d908641b5aef28f (patch) | |
tree | 8b523851f7a8cf968aa57ef9fbc52225465d1f95 | |
parent | f17213fa992e3a644b33cd3a4f6778a6a79dd152 (diff) |
adding tttestable attributes list
-rwxr-xr-x | report/report_application.rb | 13 |
1 files changed, 12 insertions, 1 deletions
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 |