0

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 available data structures i found Counter2 which seems to be exactly what I need.

Now I do have two questions:

  1. Would implementing a time series abstraction on top of breeze using Counter and Counter2 be the best way to do this?
  2. Are all matrix operations supported on Counter2 (docs says only array operations are supported for Counter)?
evan.oman
  • 5,922
  • 22
  • 43
user3139545
  • 6,882
  • 13
  • 44
  • 87

1 Answers1

1

Counter2 supports most basic matrix operations: arithmetic, slicing, matrix multiply. It doesn't support matrix decompositions or solve.

Short of using a SparseVector or a CSCMatrix with appropriate integer indices for your keys, I don't see anything better in Breeze.

dlwh
  • 2,257
  • 11
  • 23