1

I am new to Scala. Looking at it as an alternative to MATLAB for some applications.

I would like to program in Scala a wrapping class in order to be able to assign column names ("QuantityQ" && "QuantityP" -> Range) and row names (dates -> Range) to Breeze DenseMatrices (http://www.scalanlp.org/) in order to reference columns and rows.

The usage should resemble Python Pandas or Scala Saddle (http://saddle.github.io). Saddle is very interesting but its usage is limited to 2D matrices. A huge limitation.


My Ideas:

Columns: I thought a Map would do the job for colums but that may not be the best implementation.

Rows: For rows, I could maintain a separate Breeze vector with timestamps and provide methods that convert dates into timestamps, doing the numbercruncing through Breeze. This comes with a loss of generality as a user may want to give whatever string names to rows. Concerning dates I use nscala-time (a scala wrapper for joda)?


  • What are the drawbacks of my implementation?
  • Would you design the data structure differently?

Thank you for your help.

Jay Traband
  • 17,053
  • 1
  • 23
  • 44
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
  • 1
    What is the question? – Jamie Taylor Sep 06 '13 at 12:26
  • I have reformulated the question/problem in order to make it more clear. Tnx. – NoIdeaHowToFixThis Sep 06 '13 at 13:19
  • For anyone visiting this query after it was made years ago: Please see link below. It does not answer anything, really, but it is a discussion related to the question. It's basically a tentative to mimick the Dataset API provided by Spark. https://github.com/scalanlp/breeze/issues/470 – Richard Gomes Jan 31 '18 at 16:34

0 Answers0