Scala: wrapper for Breeze DenseMatrix for column and row referencing

467 Views Asked by At

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.

0

There are 0 best solutions below