Questions tagged [scala-breeze]

Breeze is a linear algebra library for Scala.

Breeze is a linear algebra library for Scala.

From the project's GitHub page:

Breeze is a library for numerical processing, machine learning, and natural language processing. Its primary focus is on being generic, clean, and powerful without sacrificing (much) efficiency. Breeze is the merger of the ScalaNLP and Scalala projects, because one of the original maintainers is unable to continue development.

197 questions
33
votes
2 answers

How to use command "publish-local" of SBT to maven repo?

The first project is an SBT project. Command "publish-local" only publishes jars to the local .ivy repository. But, another project is a maven project. I want SBT "publish-local" to maven repository. So another project can reference them from the…
Mark
  • 369
  • 1
  • 3
  • 5
27
votes
1 answer

How to configure high performance BLAS/LAPACK for Breeze on Amazon EMR, EC2

I am trying to set up an environment to support exploratory data analytics on a cluster. Based on an initial survey of what's out there my target is use Scala/Spark with Amazon EMR to provision the cluster. Currently I'm just trying to get some…
Tim Ryan
  • 1,010
  • 2
  • 11
  • 19
14
votes
2 answers

Why does IDEA report "Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror'" building scala breeze?

The breeze project builds fine from command line sbt: sbt package ... info] Done packaging. [info] Packaging /shared/breeze/viz/target/scala-2.11/breeze-viz_2.11-0.11-SNAPSHOT.jar ... [info] Done packaging. [success] Total time: 238 s, completed Jan…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
12
votes
3 answers

sbt assembly error - deduplicate: different file contents found in the following

I get the following error when I do a ./sbt assembly on my Scala project. I saw the first after adding these dependencies to my build.sbt I can compile and run my code. libraryDependencies ++= Seq( "org.scalanlp" % "breeze_2.10" % "0.7", …
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
10
votes
0 answers

Breeze vs. Spire: Can/should I combine them?

I use breeze's collections (namely DenseVector), in which I have integers and doubles and the like, and use them a little like you might use numpy's arrays. I stumbled upon https://github.com/non/spire. My impression is, it is not so strong on…
Make42
  • 12,236
  • 24
  • 79
  • 155
8
votes
6 answers

MLlib to Breeze vectors/matrices are private to org.apache.spark.mllib scope?

I have read somewhere that MLlib local vectors/matrices are currently wrapping Breeze implementation, but the methods converting MLlib to Breeze vectors/matrices are private to org.apache.spark.mllib scope. The suggestion to work around this is to…
learning_spark
  • 669
  • 1
  • 8
  • 19
7
votes
2 answers

Read a matrix from a file in Scala Breeze

I want to read a tab-delimited text file into a Breeze DenseMatrix. I see in the ScalaDoc that this should be possible and there are a whole set of I/O classes, but I can't find any examples and it's hard to digest the ScalaDoc. Can someone provide…
Dave DeCaprio
  • 2,051
  • 17
  • 31
6
votes
1 answer

How to install library with SBT libraryDependencies in an Intellij project

I am very new to SBT, Breeze and IntelliJ, though I have a decent grasp of Scala and I am trying to install the Breeze library, which I think is managed. What I've done: I followed the instructions on this page and added this script to the build.sbt…
TimY
  • 5,256
  • 5
  • 44
  • 57
5
votes
1 answer

In Apache-spark, how to add the sparse vector?

I am trying to develop my own feedforward nerual network using spark. However I can't find the operations like multiplication , add or divide in the spark's sparse vector. The document said it is implemented using breeze vector. But I can find add…
hidemyname
  • 3,791
  • 7
  • 27
  • 41
5
votes
4 answers

Scala error Could not find implicit value for parameter

I have the function flagVectorOutlier as showed in the code bellow. I'm using Breeze's DenseVector and DenseMatrix objects to calculate the value of distance. I expect as coded on the function signature, to get a Spark RDD[(Double, Boolean)]. mi and…
Saulo Ricci
  • 776
  • 1
  • 8
  • 27
5
votes
2 answers

How to zip two DenseVectors in Scala Breeze?

I'd like to zip two DenseVectors and perform an operation on each pair, and obtain a new vector as result. What is the best way to achieve this using scala-breeze? I can work around it by using their data field, but I'd need to construct a new…
Iulian Dragos
  • 5,692
  • 23
  • 31
5
votes
0 answers

Adding sparse vectors in Apache Spark efficiently

The latest release of spark uses breeze for vectors. There are no operations available for adding the vectors org.apache.spark.mllib.linalg.Vector I need to convert them to arrays and add.But the efficiency is lost. In the source code of spark the…
chanda
  • 53
  • 1
  • 9
5
votes
1 answer

How to perform element-wise scalar operations on a vector with Scala Breeze?

With Scalala it was possible to perform element-wise operations on a Vector using a scalar operand. Say you have a Vector of random numbers between 0 and 1 and you want to subtract each value from 1: import breeze.linalg._ val x =…
weston
  • 2,878
  • 3
  • 24
  • 23
4
votes
2 answers

How to replace elements of a breeze matrix in Scala based on some condition?

I am working with 2 dimensional Breeze matrices in Scala. At some point I have to do element-wise division of two matrices. Some elements in the denominator matrix can be zero, resulting into NaNs in the result. I can loop through the matrix…
inferno
  • 390
  • 1
  • 4
  • 15
4
votes
1 answer

Scala Breeze Cartesian product of vectors

Let's say I have 2 vectors of the same dimensionality: scala> val v = DenseVector(3.0, 4.0) v: breeze.linalg.DenseVector[Double] = DenseVector(3.0, 4.0) scala> val w = DenseVector(5.0, 6.0) w: breeze.linalg.DenseVector[Double] = DenseVector(5.0,…
botkop
  • 934
  • 1
  • 8
  • 17
1
2 3
13 14