diff options
Diffstat (limited to 'views/classification_validation.haml')
-rw-r--r-- | views/classification_validation.haml | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/views/classification_validation.haml b/views/classification_validation.haml index f25a321..e06cb65 100644 --- a/views/classification_validation.haml +++ b/views/classification_validation.haml @@ -3,15 +3,26 @@ = sprintf("%.2f", model.correct_predictions.to_f) if model.correct_predictions = '%' %dt - %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :rel => "external"} Weighted area under ROC: + %a{:href => "http://en.wikipedia.org/wiki/Receiver_operating_characteristic", :rel => "external"} Average area under ROC: %dd - = sprintf("%.3f", model.weighted_area_under_roc.to_f) if model.weighted_area_under_roc + - if model.average_area_under_roc + = sprintf("%.3f", model.average_area_under_roc.to_f) + - else + = 'NA' %dt %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Specificity: -%dd= sprintf("%.3f", model.specificity.to_f) if model.specificity +%dd + - if model.specificity + = sprintf("%.3f", model.specificity.to_f) + - else + = 'NA' %dt %a{:href => "http://en.wikipedia.org/wiki/Sensitivity_and_specificity", :rel => "external"} Sensitivity: -%dd= sprintf("%.3f", model.sensitivity.to_f) if model.sensitivity +%dd + - if model.sensitivity + = sprintf("%.3f", model.sensitivity.to_f) + - else + = 'NA' %dt %a{:href => "http://en.wikipedia.org/wiki/Confusion_matrix", :rel => "external"} Confusion Matrix: - if model.confusion_matrix @@ -32,7 +43,7 @@ %th{:bgcolor => "#CCD2DC"} = cm[1][i] - else - %td= cm[1][i] + %td= cm[1][i].to_i - if cm.size > 2 - (2..cm.size-1).each do |i| %tr @@ -41,4 +52,4 @@ %th{:bgcolor => "#CCD2DC"} = cm[i][j] - else - %td= cm[i][j] + %td= cm[i][j].to_i |