diff options
author | ch <ch@ot-test.in-silico.ch> | 2010-09-07 12:06:35 +0200 |
---|---|---|
committer | ch <ch@ot-test.in-silico.ch> | 2010-09-07 12:06:35 +0200 |
commit | 5c5d66c2a9487687ba9032da04031ad59ab1de46 (patch) | |
tree | 694b699fdea70c6e38c2847fda93f0b4794ad6e6 | |
parent | 3afef01f3f757d9c58c24bf490edf695ad29c176 (diff) |
display of failed validation results fixed
-rw-r--r-- | views/classification_validation.haml | 50 | ||||
-rw-r--r-- | views/validation.haml | 2 |
2 files changed, 26 insertions, 26 deletions
diff --git a/views/classification_validation.haml b/views/classification_validation.haml index 4a2d689..94ba8f9 100644 --- a/views/classification_validation.haml +++ b/views/classification_validation.haml @@ -1,33 +1,33 @@ %dt Correct predictions: %dd - = sprintf("%.2f", model.correct_predictions) - = '%' + = sprintf("%.2f", model.correct_predictions) if model.correct_predictions + = '%' %dt - %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :target => "_blank"} Weighted area under ROC: + %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :target => "_blank"} Weighted area under ROC: %dd - = sprintf("%.3f", model.weighted_area_under_roc) + = sprintf("%.3f", model.weighted_area_under_roc) if model.weighted_area_under_roc %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Specificity: -%dd= sprintf("%.3f", model.specificity) + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Specificity: +%dd= sprintf("%.3f", model.specificity) if model.specificity %dt - %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Sensitivity: -%dd= sprintf("%.3f", model.sensitivity) + %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :target => "_blank"} Sensitivity: +%dd= sprintf("%.3f", model.sensitivity) if model.sensitivity %dt - %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :target => "_blank"} Confusion Matrix: + %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :target => "_blank"} Confusion Matrix: %dd - %table - %tr - %td{:colspan => 2, :rowspan => 2} - %th{:colspan => 2} Measured - %tr - %th{:bgcolor => "#CCD2DC"} active - %th{:bgcolor => "#CCD2DC"} inactive - %tr - %th{:rowspan => 2} Predicted - %th{:bgcolor => "#CCD2DC"} active - %td= model.true_positives - %td= model.false_positives - %tr - %th{:bgcolor => "#CCD2DC"} inactive - %td= model.false_negatives - %td= model.true_negatives + %table + %tr + %td{:colspan => 2, :rowspan => 2} + %th{:colspan => 2} Measured + %tr + %th{:bgcolor => "#CCD2DC"} active + %th{:bgcolor => "#CCD2DC"} inactive + %tr + %th{:rowspan => 2} Predicted + %th{:bgcolor => "#CCD2DC"} active + %td= model.true_positives if model.true_positives + %td= model.false_positives if model.false_positives + %tr + %th{:bgcolor => "#CCD2DC"} inactive + %td= model.false_negatives if model.false_negatives + %td= model.true_negatives if model.true_negatives diff --git a/views/validation.haml b/views/validation.haml index 90150d1..bb44058 100644 --- a/views/validation.haml +++ b/views/validation.haml @@ -17,7 +17,7 @@ %dd= model.nr_predictions - case model.type - when "classification" - = haml :classification_validation, :locals=>{:model=>model}, :layout => false + = haml :classification_validation, :locals=>{:model=>model}, :layout => false if model.correct_predictions - when "regression" = haml :regression_validation, :locals=>{:model=>model}, :layout => false - else |