fix chi2


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

Branch: refs/heads/JIRA-22/pr-385
Commit: b8cf39684496f2511e59294041d443b9438394a9
Parents: abbf549
Author: amaya <g...@sapphire.in.net>
Authored: Wed Sep 21 15:02:12 2016 +0900
Committer: amaya <g...@sapphire.in.net>
Committed: Wed Sep 21 16:23:42 2016 +0900

----------------------------------------------------------------------
 core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/b8cf3968/core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java 
b/core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java
index 951aeeb..70f0316 100644
--- a/core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java
+++ b/core/src/main/java/hivemall/ftvec/selection/ChiSquareUDF.java
@@ -102,7 +102,7 @@ public class ChiSquareUDF extends GenericUDF {
         // explode and transpose matrix
         for (int i = 0; i < nClasses; i++) {
             final Object observedObjRow = observedObj.get(i);
-            final Object expectedObjRow = observedObj.get(i);
+            final Object expectedObjRow = expectedObj.get(i);
 
             Preconditions.checkNotNull(observedObjRow);
             Preconditions.checkNotNull(expectedObjRow);

Reply via email to