Skip to content

Commit 74d6f62

Browse files
committed
[SPARK-1997][MLLIB] update breeze to 0.9
0.9 dependences (this version doesn't depend on scalalogging and I excluded commons-math3 from its transitive dependencies): ~~~ +-org.scalanlp:breeze_2.10:0.9 [S] +-com.github.fommil.netlib:core:1.1.2 +-com.github.rwl:jtransforms:2.4.0 +-net.sf.opencsv:opencsv:2.3 +-net.sourceforge.f2j:arpack_combined_all:0.1 +-org.scalanlp:breeze-macros_2.10:0.3.1 [S] | +-org.scalamacros:quasiquotes_2.10:2.0.0 [S] | +-org.slf4j:slf4j-api:1.7.5 +-org.spire-math:spire_2.10:0.7.4 [S] +-org.scalamacros:quasiquotes_2.10:2.0.0 [S] | +-org.spire-math:spire-macros_2.10:0.7.4 [S] +-org.scalamacros:quasiquotes_2.10:2.0.0 [S] ~~~ Closes #1749 CC: witgo avati Author: Xiangrui Meng <meng@databricks.com> Closes #1857 from mengxr/breeze-0.9 and squashes the following commits: 7fc16b6 [Xiangrui Meng] don't know why but exclude a private method for mima dcc502e [Xiangrui Meng] update breeze to 0.9
1 parent b7c89a7 commit 74d6f62

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

mllib/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<dependency>
5858
<groupId>org.scalanlp</groupId>
5959
<artifactId>breeze_${scala.binary.version}</artifactId>
60-
<version>0.7</version>
60+
<version>0.9</version>
6161
<exclusions>
6262
<!-- This is included as a compile-scoped dependency by jtransforms, which is
6363
a dependency of breeze. -->

mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class RowMatrix(
222222
EigenValueDecomposition.symmetricEigs(v => G * v, n, k, tol, maxIter)
223223
case SVDMode.LocalLAPACK =>
224224
val G = computeGramianMatrix().toBreeze.asInstanceOf[BDM[Double]]
225-
val (uFull: BDM[Double], sigmaSquaresFull: BDV[Double], _) = brzSvd(G)
225+
val brzSvd.SVD(uFull: BDM[Double], sigmaSquaresFull: BDV[Double], _) = brzSvd(G)
226226
(sigmaSquaresFull, uFull)
227227
case SVDMode.DistARPACK =>
228228
require(k < n, s"k must be smaller than n in dist-eigs mode but got k=$k and n=$n.")
@@ -338,7 +338,7 @@ class RowMatrix(
338338

339339
val Cov = computeCovariance().toBreeze.asInstanceOf[BDM[Double]]
340340

341-
val (u: BDM[Double], _, _) = brzSvd(Cov)
341+
val brzSvd.SVD(u: BDM[Double], _, _) = brzSvd(Cov)
342342

343343
if (k == n) {
344344
Matrices.dense(n, k, u.data)

mllib/src/test/scala/org/apache/spark/mllib/linalg/distributed/RowMatrixSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RowMatrixSuite extends FunSuite with LocalSparkContext {
9999
for (mat <- Seq(denseMat, sparseMat)) {
100100
for (mode <- Seq("auto", "local-svd", "local-eigs", "dist-eigs")) {
101101
val localMat = mat.toBreeze()
102-
val (localU, localSigma, localVt) = brzSvd(localMat)
102+
val brzSvd.SVD(localU, localSigma, localVt) = brzSvd(localMat)
103103
val localV: BDM[Double] = localVt.t.toDenseMatrix
104104
for (k <- 1 to n) {
105105
val skip = (mode == "local-eigs" || mode == "dist-eigs") && k == n

project/MimaExcludes.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ object MimaExcludes {
110110
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.LabelParser$"),
111111
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.MulticlassLabelParser"),
112112
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.MulticlassLabelParser$")
113+
) ++
114+
Seq ( // package-private classes removed in MLlib
115+
ProblemFilters.exclude[MissingMethodProblem](
116+
"org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm.org$apache$spark$mllib$regression$GeneralizedLinearAlgorithm$$prependOne")
113117
)
114118
case v if v.startsWith("1.0") =>
115119
Seq(

0 commit comments

Comments
 (0)