summaryrefslogtreecommitdiff
path: root/views/predict.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2015-10-15 08:08:32 +0000
committergebele <gebele@in-silico.ch>2015-10-15 08:08:32 +0000
commit4d011490e82b3e4d1c16639a176479904055c82d (patch)
tree76a6009d0f522c9274f435c3cfc507f5efc8b337 /views/predict.haml
parentbccf3e4d6cd1fa0d3d0e346923da8b943916b6ff (diff)
fixed round issue for nil
Diffstat (limited to 'views/predict.haml')
-rw-r--r--views/predict.haml24
1 files changed, 12 insertions, 12 deletions
diff --git a/views/predict.haml b/views/predict.haml
index 91cf1e6..0e6b3cc 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -172,22 +172,22 @@
- if model.classification?
%br
= "Accuracy:\t"
- = cv.accuracy.round(3)
+ = cv.accuracy.round(3) if cv.accuracy
%br
= "Weighted Accuracy:\t"
- = cv.weighted_accuracy.round(3)
+ = cv.weighted_accuracy.round(3) if cv.weighted_accuracy
%br
= "True positive rate:\t"
- = cv.true_rate["active"].round(3)
+ = cv.true_rate["active"].round(3) if cv.true_rate["active"]
%br
= "True negative rate:\t"
- = cv.true_rate["inactive"].round(3)
+ = cv.true_rate["inactive"].round(3) if cv.true_rate["inactive"]
%br
= "Positive predictive value:\t"
- = cv.predictivity["active"].round(3)
+ = cv.predictivity["active"].round(3) if cv.predictivity["active"]
%br
= "Negative predictive value:\t"
- = cv.predictivity["inactive"].round(3)
+ = cv.predictivity["inactive"].round(3) if cv.predictivity["inactive"]
%p
%b Confusion Matrix:
%table.table.table-condensed.table-borderless{:style=>"width:20%;"}
@@ -234,22 +234,22 @@
%td
-#= "Confusion Matrix:\t"
-#= cv.confusion_matrix
- - if model.regression?
+ - if model.regression?
%br
= "Root mean squared error:\t"
- = cv.rmse.round(3)
+ = cv.rmse.round(3) if cv.rmse
%br
= "Weighted root mean squared error:\t"
- = cv.weighted_rmse.round(3)
+ = cv.weighted_rmse.round(3) if cv.weighted_rmse
%br
= "Mean absolute error:\t"
- = cv.mae.round(3)
+ = cv.mae.round(3) if cv.mae
%br
= "Weighted mean absolute error:\t"
- = cv.weighted_mae.round(3)
+ = cv.weighted_mae.round(3) if cv.weighted_mae
%br
= "R square:\t"
- = cv.r_squared.round(3)
+ = cv.r_squared.round(3) if cv.r_squared
/%br
/= "Correlation plot"
/= cv.correlation_plot