You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by pr...@apache.org on 2016/04/28 18:41:45 UTC
incubator-systemml git commit: created an explicit 3X3 confusion mat
that contains labels
Repository: incubator-systemml
Updated Branches:
refs/heads/master 5883fb54b -> 1bd7da3a5
created an explicit 3X3 confusion mat that contains labels
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/1bd7da3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/1bd7da3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/1bd7da3a
Branch: refs/heads/master
Commit: 1bd7da3a5913507561c811821b0d811ae4b1eec0
Parents: 5883fb5
Author: prithvirajsen <se...@us.ibm.com>
Authored: Thu Apr 28 09:41:42 2016 -0700
Committer: prithvirajsen <se...@us.ibm.com>
Committed: Thu Apr 28 09:41:42 2016 -0700
----------------------------------------------------------------------
scripts/algorithms/l2-svm-predict.dml | 20 ++++++++++++++++----
scripts/algorithms/m-svm-predict.dml | 2 +-
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1bd7da3a/scripts/algorithms/l2-svm-predict.dml
----------------------------------------------------------------------
diff --git a/scripts/algorithms/l2-svm-predict.dml b/scripts/algorithms/l2-svm-predict.dml
index e91f46c..a4d6fff 100644
--- a/scripts/algorithms/l2-svm-predict.dml
+++ b/scripts/algorithms/l2-svm-predict.dml
@@ -89,9 +89,21 @@ if(cmdLine_Y != " "){
check_max_y_minus = sum(pred_is_plus*y_is_minus)
check_max_y_plus = sum(pred_is_plus*y_is_plus)
- s = check_min_y_minus + "," + check_min_y_plus
- s = append(s, check_max_y_minus + "," + check_max_y_plus)
- s = append(s, "")
- write(s, cmdLine_confusion)
+ #s = check_min_y_minus + "," + check_min_y_plus
+ #s = append(s, check_max_y_minus + "," + check_max_y_plus)
+ #s = append(s, "")
+ #write(s, cmdLine_confusion)
+
+ confusion_mat = matrix(0, rows=3, cols=3)
+ confusion_mat[1,2] = negative_label
+ confusion_mat[1,3] = positive_label
+ confusion_mat[2,1] = negative_label
+ confusion_mat[3,1] = positive_label
+ confusion_mat[2,2] = check_min_y_minus
+ confusion_mat[2,3] = check_max_y_minus
+ confusion_mat[3,2] = check_min_y_plus
+ confusion_mat[3,3] = check_max_y_plus
+
+ write(confusion_mat, cmdLine_confusion, format="csv")
}
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1bd7da3a/scripts/algorithms/m-svm-predict.dml
----------------------------------------------------------------------
diff --git a/scripts/algorithms/m-svm-predict.dml b/scripts/algorithms/m-svm-predict.dml
index ba06cf6..e489568 100644
--- a/scripts/algorithms/m-svm-predict.dml
+++ b/scripts/algorithms/m-svm-predict.dml
@@ -78,7 +78,7 @@ if(cmdLine_Y != " "){
num_classes = num_classes_ground_truth
if(cmdLine_confusion != " "){
- confusion_mat = table(pred, y, num_classes, num_classes)
+ confusion_mat = table(y, pred, num_classes, num_classes)
write(confusion_mat, cmdLine_confusion, format="csv")
}
}