<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'>> @@ -96,7 +96,11 @@ bool Load(const std::string& filename,
> arma::Mat<eT>& matrix,
> DatasetMapper<PolicyType>& info,
> const bool fatal = false,
> - const bool transpose = true);
> + const bool transpose = true)
> +{
> + PolicyType policy;
> + 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<PolicyType>(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& 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;">—<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>