<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r69916122">src/mlpack/core/data/imputer.hpp</a>:</p>
<pre style='color:#555'>&gt; +              const std::string&amp; missingValue,
&gt; +              const size_t dimension)
&gt; +  {
&gt; +    T mappedValue = static_cast&lt;T&gt;(mapper.UnmapValue(missingValue, dimension));
&gt; +    strategy.Impute(input, output, mappedValue, dimension, transpose);
&gt; +  }
&gt; +
&gt; +  /**
&gt; +  * This overload of Impute() lets users to define custom value that can be
&gt; +  * replaced with the target value.
&gt; +  */
&gt; +  void Impute(const arma::Mat&lt;T&gt;&amp; input,
&gt; +              arma::Mat&lt;T&gt;&amp; output,
&gt; +              const std::string&amp; missingValue,
&gt; +              const T&amp; customValue,
&gt; +              const size_t dimension)
</pre>
<p>This overload seems like it is necessary specifically for the <code>CustomImputation</code> strategy, and allows the user to pass the <code>customValue</code> parameter.  But it seems like a user could accomplish the same thing by passing an instantiated <code>CustomImputation</code> to the constructor, if <code>CustomImputation</code> held as a local variable the <code>customValue</code>.  I think that would allow you to remove this function and simplify the code; what do you think?</p>

<p>Certainly in the examples for the imputer, we should document how someone can use the <code>CustomImputation</code> class as an example, since it would be a little more complex than just calling this function.</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#r69916122">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFETiQPdbB-VBqCp250dvuqdOeBUkks5qTQxpgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFHNOwpIzU5Q2srwleuDZFKNiAxuAks5qTQxpgaJpZM4I07W-.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#r69916122"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>