<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r69923037">src/mlpack/core/data/imputer.hpp</a>:</p>
<pre style='color:#555'>> +
> + //! Get the mapper
> + const MapperType& Mapper() const { return mapper; }
> +
> + //! Modify the given mapper (be careful!)
> + MapperType& Mapper() { return mapper; }
> +
> + private:
> + // StrategyType
> + StrategyType strategy;
> +
> + // DatasetMapperType<MapPolicy>
> + MapperType mapper;
> +
> + // save transpose as a member variable since it is rarely changed.
> + bool transpose;
</pre>
<p>Oh! Now I understand. I agree, maybe <code>columnMajor</code> is a better name, and we should definitely add some documentation so that the user is clear that when <code>columnMajor = true</code>, then the imputation is done with each column as a point, and when false, with each row as a point.</p>
<p>That has an interesting implication---when you are only doing imputation on a single dimension, it will actually be quicker to load the matrix without transposing (so it is row-major), then call <code>Impute()</code> on the dimension of interest (which will be entirely contiguous in memory).</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#r69923037">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFPQJJt2kWZnBme0wJg3IbRiMo1SUks5qTRTSgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLaerFH1Xst5haqSm4ar9cSxr-frks5qTRTSgaJpZM4I07W-.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#r69923037"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>