summaryrefslogtreecommitdiff
path: root/report/report_content.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2012-04-02 16:11:28 +0200
committermguetlein <martin.guetlein@gmail.com>2012-04-02 16:11:28 +0200
commit324e7f2dc7c8417fd5af0a084f06ecc92de41d48 (patch)
tree2a1e60ac26b1764450441eb0431ca694171e012b /report/report_content.rb
parent8a199a09a6d9ac8b0349af0d7c5b5320bdcec9b5 (diff)
new stratified type super added to crossvalidation and traning-test-split validation, add some more metadata to crossvaldiation, add validation_uri to predictions in crossvaldiation-report
Diffstat (limited to 'report/report_content.rb')
-rwxr-xr-xreport/report_content.rb11
1 files changed, 4 insertions, 7 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