<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r66937742">src/mlpack/core/data/imputer.hpp</a>:</p>
<pre style='color:#555'>&gt; +
&gt; +/**
&gt; + * This class implements a way to replace target values. It is dependent on the
&gt; + * user defined Strategy and Mapper used to hold dataset&#39;s information.
&gt; + *
&gt; + * @tparam Option of imputation strategy.
&gt; + * @tparam Mapper that is used to hold dataset information.
&gt; + * @tparam primitive type of input and output&#39;s armadillo matrix.
&gt; + */
&gt; +template&lt;typename MatType, typename Mapper, typename Strategy&gt;
&gt; +class Imputer
&gt; +{
&gt; + private:
&gt; +  Strategy strat;
&gt; + public:
&gt; +  Imputer()
</pre>
<p>Maybe we could store the Mapper, Strategy and transpose information in the class, ask the users to pass them into the constructor.This way the Strategy could save some "states", which should help us to reduce some computation(like MeanStrategy)</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/5a517c25ef55de1f4814dc3605190d17f868ff82#r66937742">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFDHPaPBkMkNthRK5FxVK4NE8pl7mks5qLnUMgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPWE67afu4MKIJtIDR7mFxkGQ_qgks5qLnUMgaJpZM4I07W-.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/5a517c25ef55de1f4814dc3605190d17f868ff82#r66937742"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>