summaryrefslogtreecommitdiff
path: root/report
diff options
context:
space:
mode:
Diffstat (limited to 'report')
-rwxr-xr-xreport/report_content.rb11
-rwxr-xr-xreport/report_factory.rb4
2 files changed, 6 insertions, 9 deletions
diff --git a/report/report_content.rb b/report/report_content.rb
index 80473c5..033b367 100755
--- a/report/report_content.rb
+++ b/report/report_content.rb
@@ -63,20 +63,17 @@ class Reports::ReportContent
end
end
- def add_predictions( validation_set,
- validation_attributes=[],
+ def add_predictions( validation_set,
+ add_validation_uris,
section_title="Predictions",
section_text=nil,
table_title="Predictions")
-
- #PENING
- raise "validation attributes not implemented in get prediction array" if validation_attributes.size>0
-
section_table = @xml_report.add_section(@current_section, section_title)
if validation_set.validations[0].get_predictions
@xml_report.add_paragraph(section_table, section_text) if section_text
+ v_uris = validation_set.validations.collect{|v| Array.new(v.num_instances.to_i,v.validation_uri)} if add_validation_uris
@xml_report.add_table(section_table, table_title, Lib::OTPredictions.to_array(validation_set.validations.collect{|v| v.get_predictions},
- true, true))
+ true, true, v_uris))
else
@xml_report.add_paragraph(section_table, "No prediction info available.")
end
diff --git a/report/report_factory.rb b/report/report_factory.rb
index f51b999..f73ffd9 100755
--- a/report/report_factory.rb
+++ b/report/report_factory.rb
@@ -124,7 +124,7 @@ module Reports::ReportFactory
report.end_section
report.add_result(validation_set, Validation::ALL_PROPS, "All Results", "All Results")
- report.add_predictions( validation_set )
+ report.add_predictions( validation_set, false )
task.progress(100) if task
report
end
@@ -200,7 +200,7 @@ module Reports::ReportFactory
report.add_result(validation_set, Validation::ALL_PROPS, "All Results", "All Results") if
(cv_set.unique_value(:num_folds).to_i < cv_set.unique_value(:num_instances).to_i)
- report.add_predictions( validation_set ) #, [:crossvalidation_fold] )
+ report.add_predictions( validation_set, true )
task.progress(100) if task
report
end