summaryrefslogtreecommitdiff
path: root/report/report_factory.rb
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-01-07 09:35:17 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2010-01-07 09:35:17 +0100
commit15f49fc9862fa995612c7960becc2ce98f2bd1c4 (patch)
treeba90be782f56d9a8982409a6160199ab50c7226f /report/report_factory.rb
parente4379c9757cc5376c63dffb8be94d0c427cef77a (diff)
* replace load with require (to avoid loading resources twice)
* adjust to new api * move validation constants from wrapper to lib in validation * accept header parsing in validation * rdf-support in validation
Diffstat (limited to 'report/report_factory.rb')
-rw-r--r--report/report_factory.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/report/report_factory.rb b/report/report_factory.rb
index 4b3d18e..8b14e0a 100644
--- a/report/report_factory.rb
+++ b/report/report_factory.rb
@@ -59,7 +59,7 @@ module Reports::ReportFactory
report.add_section_result(validation_set, VAL_ATTR_TRAIN_TEST + VAL_ATTR_REGR, "Results", "Results")
end
- report.add_section_result(validation_set, OpenTox::Validation::ALL_PROPS, "All Results", "All Results")
+ report.add_section_result(validation_set, Lib::ALL_PROPS, "All Results", "All Results")
report.add_section_predictions( validation_set )
return report
end
@@ -92,7 +92,7 @@ module Reports::ReportFactory
report.add_section_result(validation_set, VAL_ATTR_CV+VAL_ATTR_REGR-[:num_folds], "Results","Results")
end
- report.add_section_result(validation_set, OpenTox::Validation::ALL_PROPS, "All Results", "All Results")
+ report.add_section_result(validation_set, Lib::ALL_PROPS, "All Results", "All Results")
report.add_section_predictions( validation_set, [:crossvalidation_fold] )
return report
end
@@ -216,14 +216,21 @@ class Reports::ReportContent
end
def add_section_roc_plot( validation_set,
- class_value,
+ class_value = nil,
split_set_attribute = nil,
plot_file_name="roc-plot.svg",
section_title="Roc Plot",
section_text="This section contains the roc plot.",
image_title=nil,
image_caption=nil)
- image_title = "Roc Plot for class-value '"+class_value+"'" unless image_title
+ unless image_title
+ if class_value
+ image_title = "Roc Plot for class-value '"+class_value+"'"
+ else
+ image_title = "Roc Plot for all classes"
+ end
+ end
+
section_roc = @xml_report.add_section(@xml_report.get_root_element, section_title)
if validation_set.first.get_predictions