In this blog post I'll try to describe my contributions I've made to
mlpack this summer.
Here is the link for all my pull requests pull requests. Below is the list of the major pull requests with self-explanatory descriptions.
- Descriptive Statistics command-line program : 742
- DatasetMapper & Imputer 694
- delete unused string_util : 692
- fix default output problem and some styles : 680
- Binarize Function + Test : 666
- add Split() without label: 654
- add cli executable for data_split : 650
I originally built a class that calculates descriptive statistics. But after a few discussion, I ended up shrinking all of the functions down to minimum to provide maximum performance and maintainability. I also merged all commits to one to discard unnecessary commits.
Sample output on
"iris.csv" would be:
Users can control the width and precision using -w and -p flag. I tested the output using excel and they match perfectly.
DatasetMapper & Imputer
I renamed DatasetInfo to DatasetMapper, which accepts template parameter of MapPolicy. ( can be used to store different kinds of maps.) DatasetMapper, however, still provides backward compatibility with typedef:
using DatasetInfo = DatasetMapper<IncrementPolicy>. The IncrementPolicy denotes the original mapping policy used, which increments numbers for different categories, starting from 0.
Imputer class is also added in this pull request. Imputer also accepts template parameter called ImputationStrategy, so that different strategies can be applied.
Lastly, a command line program called
"mlpack_preprocess_imputer.cpp" was added to the
This is a simple implementation of binarize function which transforms values in matrix to 0 or 1 according to the threshold. You can use
umat A = (B > C) but this function has a overload that applies binarize to only one dimension. Plus, it can produce any type of matrix, not umat.
I added TrainTestSplit() and renamed old ones to LabelTrainTestSplit() as discussed in #651 . This is just a naive implementation mostly copied from Tham's work. I believe LabelTrainTestSplit can just reuse the code in TrainTestSplit twice for both data and labels.
I also implemented
I also made minor contributions in debugging and fixing styles, especially related to data IO.
I wish to keep contributing to
mlpack. I will try to polish the works a little bit more, and especially, I would LOVE to contribute to the deep learning modules. I've been personally reading papers about sequence-to-sequence models, which are used widely for natural language processing and timeseries data analytics.
I thank the
mlpack mentors and especially to Tham who gave me a lot of advises through code reviews.
Generated by 1.8.13