<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r70135106">src/mlpack/core/data/map_policies/missing_policy.hpp</a>:</p>
<pre style='color:#555'>&gt; +  {
&gt; +    // Nothing to initialize here.
&gt; +  }
&gt; +
&gt; +
&gt; +  template &lt;typename MapType&gt;
&gt; +  mapped_type MapString(const std::string&amp; string,
&gt; +                        const size_t dimension,
&gt; +                        MapType maps,
&gt; +                        std::vector&lt;Datatype&gt;&amp; types)
&gt; +  {
&gt; +    // If this condition is true, either we have no mapping for the given string
&gt; +    // or we have no mappings for the given dimension at all.  In either case,
&gt; +    // we create a mapping.
&gt; +    const double NaN = std::numeric_limits&lt;double&gt;::quiet_NaN();
&gt; +    if (missingSet.count(string) != 0 &amp;&amp;
</pre>
<p>I see what you mean.  My thinking was, everything in <code>missingSet</code> is something we might expect to be in <code>maps</code> by the end of loading.  So you can save a little bit of time by just putting everything in <code>missingSet</code> into <code>maps</code> pre-emptively.  The code as it is written here only adds things into <code>maps</code> from <code>missingSet</code> when it is seen, but I am not sure it is important to have a different, standalone <code>missingSet</code>.  What do you think?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r70135106">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEr1mCLnzc_27a07Dy3s9NXSucWjks5qTrFLgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNPx5ebAbG2zs_Hz4_8XcnrDXjATks5qTrFLgaJpZM4I07W-.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/694/files/a8818316a04506530e2269a2e0a32ba2f6a1c83b#r70135106"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>