[mlpack-git] [mlpack/mlpack] DatasetMapper & Imputer (#694)

Keon Kim notifications at github.com
Thu Jul 7 04:12:16 EDT 2016


> +#include <limits>
> +
> +
> +using namespace std;
> +
> +namespace mlpack {
> +namespace data {
> +
> +/**
> + * Same as increment map policy, but does not change type of features.
> + */
> +class MissingPolicy
> +{
> + public:
> +  // typedef of mapped_type
> +  using mapped_type = double;

@zoq it is because mappings can be any type of pairs. DatasetMapper takes care of mapping string values to any type of numeric values. 
For example, IncrementPolicy defines mapped_type as size_t. Therefore the DatasetMapper knows how to map and [return](https://github.com/mlpack/mlpack/pull/694/files#diff-4654fc03017f8f55e68d7e012a8c74f9R78) the data. (string to size_t mapping)
However, MissingPolicy uses NaN so the mapped_type is defined as double.  

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r69866700
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160707/fce0acdd/attachment.html>


More information about the mlpack-git mailing list