minor fix


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

Branch: refs/heads/JIRA-22/pr-385
Commit: 80be81ecf92cd4675dcdfaa5f456d84d484d6c44
Parents: 4cfa4e5
Author: amaya <g...@sapphire.in.net>
Authored: Wed Sep 28 20:01:08 2016 +0900
Committer: amaya <g...@sapphire.in.net>
Committed: Wed Sep 28 20:01:08 2016 +0900

----------------------------------------------------------------------
 .../main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java  | 2 +-
 .../test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/80be81ec/core/src/main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java 
b/core/src/main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java
index 507aefa..96fdc5b 100644
--- a/core/src/main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java
+++ b/core/src/main/java/hivemall/ftvec/selection/SignalNoiseRatioUDAF.java
@@ -335,7 +335,7 @@ public class SignalNoiseRatioUDAF extends 
AbstractGenericUDAFResolver {
                         final double snr = Math.abs(myAgg.meanss[j][i] - 
myAgg.meanss[k][i])
                                 / (sds[j] + sds[k]);
                         // if `NaN`(when diff between means and both sds are 
zero, IOW, all related values are equal),
-                        // regard feature `i` as meaningless between class `j` 
and `k` and skip
+                        // regard feature `i` as meaningless between class `j` 
and `k`, skip
                         if (!Double.isNaN(snr)) {
                             result[i] += snr; // accept `Infinity`
                         }

http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/80be81ec/spark/spark-2.0/src/test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala
----------------------------------------------------------------------
diff --git 
a/spark/spark-2.0/src/test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala
 
b/spark/spark-2.0/src/test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala
index 2e18280..7b62b92 100644
--- 
a/spark/spark-2.0/src/test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala
+++ 
b/spark/spark-2.0/src/test/scala/org/apache/spark/sql/hive/HivemallOpsSuite.scala
@@ -740,7 +740,8 @@ final class HivemallOpsWithFeatureSuite extends 
HivemallFeatureQueryTest {
 
     // | 1  2  3 |T    | 5  6  7 |
     // | 3  4  5 |  *  | 7  8  9 |
-    val df0 = Seq((1, Seq(1, 2, 3), Seq(5, 6, 7)), (1, Seq(3, 4, 5), Seq(7, 8, 
9))).toDF.as("c0", "arg0", "arg1")
+    val df0 = Seq((1, Seq(1, 2, 3), Seq(5, 6, 7)), (1, Seq(3, 4, 5), Seq(7, 8, 
9)))
+      .toDF("c0", "arg0", "arg1")
 
     df0.groupby($"c0").transpose_and_dot("arg0", "arg1").collect() shouldEqual
       Seq(Row(1, Seq(Seq(26.0, 30.0, 34.0), Seq(38.0, 44.0, 50.0), Seq(50.0, 
58.0, 66.0))))

Reply via email to