All Articles

Experience: Week Five

mlpack-logo.png gsoc-logo.png

End of week 5 was a bit progressive, although I didn’t write much code I went though a whole lot of code related to DatasetMapper. I got to see some really beautifully written code by Ryan and Keon. My mentor told me in the start of the project that, “your project is a bit different as it involves more of reading others code and making changes to it rather than writing your own code from strach”. Well now I am understanding what Omar meant.

I think I should write another article totally dedicated to DatasetMapper talking about how it works and what it adds to mlpack. Also it’s not at all fair that such well written implementation is not being noticed by the mlpack users.

Currently DatasetMapper uses the parser based on boost. Our goal is to remove all the boost part and replace it with our new parser’s fucntionality.

Code that loads the data and creates the DatasetMapper object resides in load_csv.hpp (master branch). We have to types of parse here:

  • TransposeParse
  • NonTransposeParse

Depending on the type of parse we have two other ulitity fucntions

  • GetMatrixSize
  • GetTransposeMatrixSize

Curently I am done refactoring the above mentioned utility fucntions. I am able to build mlpack after refactoring but that only confirms the syntactical part of the code. I am getting some issues in running the tests.

When Load() is being called from load_save_test.cpp it is not selecting the proper overload in case of sparse matrix. It is calling the overload that is for dense matrix and therefore it is throwing errors. Solving this error might mean I have to revisit the SFINAE.

The issue is due to changes in the design of the code. I hope to solve the error and underlying issue in the coming week so I can test the parser properly as something like parser requires extensive testing so that we don’t miss any use case.

I think that would be it for this week, I hope I can come up with an article on DatasetMapper with the next week’s update.

PS. This week was very exhaustive as I was relocating, so I had to take some days off the project. Thank you Omar for your continous support though out the phase.