Skip to content

Latest commit

 

History

History
165 lines (164 loc) · 4.52 KB

File metadata and controls

165 lines (164 loc) · 4.52 KB

SSparseMatrix work plan

Introduction

  • This org-mode file has a work plan list and a unit test list that correspond (and hopefully reflect) the development of the Python package SSparseMatrix.

Work plan [50%] [7/14]

Object structure

  • [X] Sparse matrix
    • scipy.sparse.csr_matrix
  • [X] Row names
    • dict
  • [X] Column names
    • dict
  • [X] Dimension names
    • dict

Core functionalities [75%] [3/4]

Getters [100%] [8/8]

  • [X] Sparse matrix
  • [X] Row names
  • [X] Column names
  • [X] Dimension names
  • [X] Shape
  • [X] Rows count
  • [X] Columns count
  • [X] Deep copy

Setters [100%] [4/4]

  • [X] Sparse matrix
    • csr_matrix is preferred
  • [X] Row names
    • [X] Default row names
    • [X] List spec
    • [X] Dictionary spec
  • [X] Column names
    • [X] Default row names
    • [X] List spec
    • [X] Dictionary spec
  • [X] Dimension names
    • [X] Default row names
    • [X] List spec
    • [X] Dictionary spec

Transposing

  • The first non-trivial operation to make

Pretty printing [75%] [3/4]

  • Important to have in order to visualize results during development.
  • [X] Object method
  • [X] Digits specifications
  • [X] Whether to have boundary or not
  • [ ] Printing into a string
    • In order to have __str__ implementation that print can use.

Point-wise arithmetic [0%] [0/2]

  • [-] Multiplication [75%] [3/4]
    • [X] SSparseMatrix
    • [X] Scalar
    • [ ] numpy.array
    • [X] scipy.sparse.csr_matrix
  • [-] Addition [75%] [3/4]
    • [X] SSparseMatrix
    • [X] Scalar
    • [ ] numpy.array
    • [X] scipy.sparse.csr_matrix

Point-wise functions [0%] [0/4]

  • [ ] Figure out general delegation mechanism
  • [ ] Abs
  • [ ] Log

Whole matrix functions [33%] [1/3]

  • [X] Unitizing
  • [ ] Matrix power
  • [ ] Matrix norm

Element access and sub-matrices [100%] [4/4]

  • [X] Single element access
    • [X] By indexes
    • [X] By row- and column name
  • [X] Sub-matrix by index slice spec
    • [X] Row spec
    • [X] Column spec
    • Using both specs is not implemented in ~scipy.sparse~
  • [X] Sub-matrix by list of names
    • [X] Row spec
    • [X] Column spec
    • Using both specs is not implemented in ~scipy.sparse~
  • [X] Mixed specs
    • Works “out of the box”

Element setting / assignment

Sum-matrix setting / assignment

Dot product [100%] [4/4]

  • [X] SSparseMatrix
  • [X] scipy.sparse.csr_matrix
  • [X] list
  • [X] numpy.array

Sums [%] [/]

  • [X] Row sums
  • [X] Row sums dictionary
  • [X] Column sums
  • [X] Column sums dictionary

Matrix concatenations [%] [/]

  • [X] Row binding
  • [X] Column binding

Impose names [100%] [2/2]

  • [X] Impose row names
  • [X] Impose column names
    • Done through transposing

Representation [100%] [4/4]

  • [X] Triplets
  • [X] Wolfram Language form
  • [X] String __str__
  • [X] Concise form __repr__

Revisit row and column names setting

  • [ ] Check the row names are unique
  • [ ] Check the column names are unique
  • [ ] Give appropriate diagnostic messages

Unit tests [16%] [1/6]

  • The unit tests (so far) are made with small matrices in order to make easier visual verification (by humans.)

Basic functionalities [71%] [5/7]

  • [X] Creation
  • [X] Get row names
  • [X] Get column names
  • [X] Set row names
  • [X] Set column names
  • [ ] Set dimensions names
  • [X] Transposing

Dot product [100%] [3/3]

  • [X] SSparseMatrix by SSparseMatrix
    • Dot product by object’s transpose
  • [X] Vector-list
  • [X] numpy.array

Point-wise operations [0%] [0/3]

  • [ ] Addition
    • [ ] SSparseMatrix object
    • [ ] scipy.sparse.csr_matrix object
    • [ ] Scalar
  • [ ] Multiplication
    • [ ] SSparseMatrix object
    • [ ] scipy.sparse.csr_matrix object
    • [ ] Scalar
  • [ ] Unitizing
    • [ ] Default
    • [ ] By threshold

Row and column binding

  • [ ] Row binding with proper matrices
  • [ ] Column binding

Impose names

  • [ ] Row names
  • [ ] Column names

Sums

Documentation [%50] [2/3]

Usage messages

  • Usage message for each method.

First version

  • [X] Just the basics:
    • [X] Creation
    • [X] Object structure
    • [X] Dot product
    • [X] Transpose
    • [X] Sub-matrices
    • [X] Row and column sums
    • [X] Deep copies and in-place computations
    • [X] References
  • [X] examples.py
  • [X] Jupyter notebook
  • [X] README.md
    • [X] Based on the Jupyter notebook
    • [C] From examples.py

Advanced use cases