Repository: incubator-systemml
Updated Branches:
  refs/heads/master 9165fbc5d -> 0fdaba9c8


[SYSTEMML-645] Change Naive-bayes accuracy result to scalar

Closes #127.


Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/0fdaba9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/0fdaba9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/0fdaba9c

Branch: refs/heads/master
Commit: 0fdaba9c8fc59f86f31bcda41a18bb6e82b7e9a7
Parents: 9165fbc
Author: Tommy YU <[email protected]>
Authored: Fri Apr 22 15:54:15 2016 -0700
Committer: Deron Eriksson <[email protected]>
Committed: Fri Apr 22 15:54:15 2016 -0700

----------------------------------------------------------------------
 scripts/algorithms/naive-bayes-predict.dml | 2 +-
 scripts/algorithms/naive-bayes.dml         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/0fdaba9c/scripts/algorithms/naive-bayes-predict.dml
----------------------------------------------------------------------
diff --git a/scripts/algorithms/naive-bayes-predict.dml 
b/scripts/algorithms/naive-bayes-predict.dml
index f83c86e..b4d2ebe 100644
--- a/scripts/algorithms/naive-bayes-predict.dml
+++ b/scripts/algorithms/naive-bayes-predict.dml
@@ -70,7 +70,7 @@ if(cmdLine_Y != " "){
        acc_str = "Accuracy (%): " + acc
        print(acc_str)
        if(cmdLine_accuracy != " ")
-               write(acc_str, cmdLine_accuracy)
+               write(acc, cmdLine_accuracy)
 
        num_classes = nrow(prior)
        num_classes_ground_truth = max(C)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/0fdaba9c/scripts/algorithms/naive-bayes.dml
----------------------------------------------------------------------
diff --git a/scripts/algorithms/naive-bayes.dml 
b/scripts/algorithms/naive-bayes.dml
index 8284453..a01a5fc 100644
--- a/scripts/algorithms/naive-bayes.dml
+++ b/scripts/algorithms/naive-bayes.dml
@@ -74,7 +74,7 @@ acc = sum(rowIndexMax(logProbs) == C) / numRows * 100
 
 acc_str = "Training Accuracy (%): " + acc
 print(acc_str)
-write(acc_str, $accuracy)
+write(acc, $accuracy)
 
 extraModelParams = as.matrix(numFeatures)
 classPrior = rbind(classPrior, extraModelParams)

Reply via email to