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

Keon Kim notifications at github.com
Fri Jul 8 00:50:33 EDT 2016


> +    if (missingSet.count(string) != 0 &&
> +        (maps.count(dimension) == 0 ||
> +         maps[dimension].first.left.count(string) == 0))
> +    {
> +      // This string does not exist yet.
> +      size_t& numMappings = maps[dimension].second;
> +
> +      typedef boost::bimap<std::string, mapped_type>::value_type PairType;
> +      maps[dimension].first.insert(PairType(string, NaN));
> +
> +      ++numMappings;
> +      return NaN;
> +    }
> +    else
> +    {
> +      // This string already exists in the mapping or .

Updated

---
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#r70025002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160707/463f100d/attachment.html>


More information about the mlpack-git mailing list