<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'>> + const std::string& missingValue,
> + const size_t dimension)
> + {
> + T mappedValue = static_cast<T>(mapper.UnmapValue(missingValue, dimension));
> + strategy.Impute(input, output, mappedValue, dimension, transpose);
> + }
> +
> + /**
> + * This overload of Impute() lets users to define custom value that can be
> + * replaced with the target value.
> + */
> + void Impute(const arma::Mat<T>& input,
> + arma::Mat<T>& output,
> + const std::string& missingValue,
> + const T& customValue,
> + 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;">—<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>