You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by sm...@apache.org on 2016/12/27 17:49:10 UTC

mahout git commit: MAHOUT-1875: Use faster shallowCopy for dense matices in blockify drm\/package.blockify(), this closes apache/mahout#264

Repository: mahout
Updated Branches:
  refs/heads/master 8c614a166 -> 8a0a07489


MAHOUT-1875: Use faster shallowCopy for dense matices in blockify drm\/package.blockify(), this closes apache/mahout#264


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/8a0a0748
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/8a0a0748
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/8a0a0748

Branch: refs/heads/master
Commit: 8a0a074898c345b73b17a058301acb01352db12b
Parents: 8c614a1
Author: smarthi <sm...@apache.org>
Authored: Tue Dec 27 12:47:14 2016 -0500
Committer: smarthi <sm...@apache.org>
Committed: Tue Dec 27 12:47:14 2016 -0500

----------------------------------------------------------------------
 .../scala/org/apache/mahout/math/scalabindings/package.scala     | 4 ++--
 .../main/scala/org/apache/mahout/sparkbindings/drm/package.scala | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/8a0a0748/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala
----------------------------------------------------------------------
diff --git a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala
index 167e192..8b1ce65 100644
--- a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala
+++ b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala
@@ -420,7 +420,7 @@ package object scalabindings {
 
   /**
     * Check the density of an in-core matrix based on supplied criteria.
-    * Returns true if we think mx is densier than threshold with at least 80% confidence.
+    * Returns true if we think mx is denser than threshold with at least 80% confidence.
     *
     * @param mx  The matrix to check density of.
     * @param threshold the threshold of non-zero elements above which we consider a Matrix Dense
@@ -465,7 +465,7 @@ package object scalabindings {
       else if (mean > threshold + iv) return true // dense
     }
 
-    return mean > threshold // if (mean > threshold) dense
+    mean > threshold // if (mean > threshold) dense
 
   }
 

http://git-wip-us.apache.org/repos/asf/mahout/blob/8a0a0748/spark/src/main/scala/org/apache/mahout/sparkbindings/drm/package.scala
----------------------------------------------------------------------
diff --git a/spark/src/main/scala/org/apache/mahout/sparkbindings/drm/package.scala b/spark/src/main/scala/org/apache/mahout/sparkbindings/drm/package.scala
index 77262bd..5afb128 100644
--- a/spark/src/main/scala/org/apache/mahout/sparkbindings/drm/package.scala
+++ b/spark/src/main/scala/org/apache/mahout/sparkbindings/drm/package.scala
@@ -66,7 +66,7 @@ package object drm {
         // Test the density of the data. If the matrix does meets the
         // requirements for density, convert the Vectors to a DenseMatrix.
         val resBlock = if (densityAnalysis(block)) {
-          val dBlock = new DenseMatrix(vectors.length, blockncol)
+          val dBlock = new DenseMatrix(Array.ofDim[Double](vectors.length, blockncol), true)
           var row = 0
           while (row < vectors.length) {
             dBlock(row, ::) := vectors(row)