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
0
votes
3 answers

Scala referencing function in another function

I am relatively new to Scala, been using R and MATLAB before. I have written the following piece of code in Scala. I've written the same code in R and MATLAB, and in both it works just fine, but due to my inexperience with Scala the code below does…
Jamil
  • 61
  • 7
0
votes
1 answer

Scala JSON to DenseMatrix

I am trying to convert this JSON response: [ { "metric":"energy.salted", "tags":{ "sensor":"0", "unit":"101" }, "aggregateTags":[ ], "dps":{ "1477958400":1.9519165754318237, …
Chirag
  • 446
  • 2
  • 14
0
votes
1 answer

force dependency update in build.sbt

I am using breeze-viz 0.3, but need to use newer version of jfreechart. According to the dependency table https://mvnrepository.com/artifact/org.scalanlp/breeze-viz_2.10/0.3 jfreechart 1.0.13 is the default, but 1,0.19 is the updated version,…
bhomass
  • 3,414
  • 8
  • 45
  • 75
0
votes
1 answer

Updating scala breeze matrix for point with x,y coordinates (NOT length of rows and cols)

I'm new to Scala (Python background) and trying to implement a Quadtree for my sparse data and attempting to use Breeze to do so (although if you have a better suggestion, I'm totally open to it). My problem is this: I need to know how to update a…
SnarkShark
  • 360
  • 1
  • 7
  • 20
0
votes
1 answer

filling a matrix with Scala library breeze

I'm new to Scala and I'm having a mental block on a seemingly easy problem. I'm using the Scala library breeze and need to take an array buffer (mutable) and put the results into a matrix. This... should be simple but? Scala is so insanely type…
SnarkShark
  • 360
  • 1
  • 7
  • 20
0
votes
1 answer

Convert Breeze Matrix to Numpy Array

Is it possible to convert a breeze dense matrix to numpy array using spark? I have here a breeze dense matrix I want to convert to numpy array.
Alger Remirata
  • 529
  • 1
  • 5
  • 17
0
votes
1 answer

How to handle time index with custom time series datastructure

I want to implement my own time series data structure and I want to do it using ScalaNLP Breeze. Now my first thought was to do this using a type like this: type RowNumber = Long Map[LocalDateTime, RowNumber] However after reading more about breeze…
user3139545
  • 6,882
  • 13
  • 44
  • 87
0
votes
1 answer

scala breeze solving sparse system AX=B, how to construct B

In relation to the answer of NOAH on how to use CSCMatrix how to construct matrix B, it consists of what items?
Francois Saab
  • 77
  • 1
  • 9
0
votes
1 answer

Scala, how to convert a (Breeze) matrix to a geoTiff image?

I have a matrix representing an image, in Breeze. For instance, each cell (x, y) holds a RGB value. I can save it as various image formats (GIF, Jpeg...) using Scrimage. How can I generate a geoTiff image? I am looking at GeoTrellis but haven't…
ticofab
  • 7,551
  • 13
  • 49
  • 90
0
votes
1 answer

Scala Breeze implicit CanMapValues

I am using the Breeze library for matrices operations in Scala. Everything looks good but it cannot find an implicit at compilation time: could not find implicit value for parameter bf:…
ticofab
  • 7,551
  • 13
  • 49
  • 90
0
votes
1 answer

Change an element of DenseVector of Breeze Scala Error

I am merely trying to change an element of a DenseVector[Double] from the Breeze linear algebra package. My minimal example looks like this: import breeze.linalg.{DenseVector} val p = 20 val B = DenseVector.rand(p).map(x=>0.0) val…
Lindon
  • 1,292
  • 1
  • 10
  • 21
0
votes
0 answers

superclass of breeze distributions

I am trying to use Breeze distributions as an argument to a function. A trivial example would be: def foo(d: D, x: Double) = d.logPdf(x) I would like this to work for examples foo(Gassian(0,1),0.5) foo(Laplace(0,1),0.5) The problem is I do not…
Lindon
  • 1,292
  • 1
  • 10
  • 21
0
votes
0 answers

Reducing a RDD containing uncommon objects

I have a RDD[(breeze.linalg.DenseMatrix[Int], Array[Int])], using a DenseMatrix from the Breeze library that I would like to reduce but I am not sure how. Here is an example (I simplified the code, a DenseMatrix with only one column is not really…
Armand Grillet
  • 3,229
  • 5
  • 30
  • 60
0
votes
1 answer

How can I write Logistic Regression with Scala Breeze with LBFGS?

I am writing Scala code about Logistic regression. I am trying to use Scala Breeze, but I am getting errors when I try my code. This is my code. Basically I tried to write same like here. import breeze.linalg._ import breeze.optimize._ def…
0
votes
1 answer

Scala Breeze zipValues issue

Say I have the following Scala code. I am running Scala 2.11.8 and Breeze 0.13. val a: DenseVector[Double] = DenseVector(1.1, 1.2, 1.3) val b: DenseVector[Double] = DenseVector(1.1, 1.2, 1.3) val v: DenseVector[Double] = zipValues(a, b) ((ai:…
Luis dos Reis
  • 35
  • 2
  • 5