<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r69384323">src/mlpack/core/data/load.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -96,7 +96,11 @@ bool Load(const std::string&amp; filename,
&gt;            arma::Mat&lt;eT&gt;&amp; matrix,
&gt;            DatasetMapper&lt;PolicyType&gt;&amp; info,
&gt;            const bool fatal = false,
&gt; -          const bool transpose = true);
&gt; +          const bool transpose = true)
&gt; +{
&gt; +  PolicyType policy;
&gt; +  return Load(filename, matrix, info, policy, fatal, transpose);
</pre>
<p>Since you already provide an api to access the policy of the DatasetMapper, I think we could remove another Load function which allow user to pass the policy. This would make the api more consistent.</p>

<p>You can create the DatasetMapper in the Load function without the policy parameters pass</p>

<p><code>info = info = DatasetMapper&lt;PolicyType&gt;(info.Policy(), cols);</code></p>

<p>By this way users only need to store the state in their DatasetMapper only, I think this is less confusing.Else the users may think <br>
"I already store my policy in the DatasetMapper, why should I pass the policy into the Load function again?"</p>

<p>If you want to allow the users to get/set their policy states, you can add two api to the DatasetMapper</p>

<pre><code>PolicyType const&amp; Policy() const
{
  return policy;
}
void Policy(PolicyType value)
{
  policy = std::move(value);
}
</code></pre>

<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/a340f69411b6a6d16106023e4bbcceb9d4688322..21d94c04652e8faadd5e8991103a3b73b4c81033#r69384323">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFDsJGZW6ZD8bQdsC8s9ApeFaIX2gks5qRwxKgaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLWTyC88UkYxpOZGpkPMmqo8Fkp3ks5qRwxKgaJpZM4I07W-.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/a340f69411b6a6d16106023e4bbcceb9d4688322..21d94c04652e8faadd5e8991103a3b73b4c81033#r69384323"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>