<p>Sorry for the slow response, I didn't really have a chance to look into this until today.  If you'd like to open a PR, that might be a good idea.  A couple quick notes:</p>

<ul>
<li><p>Please take a glance at the style guidelines -- <a href="https://github.com/mlpack/mlpack/wiki/StyleGuidelines">https://github.com/mlpack/mlpack/wiki/StyleGuidelines</a> -- I'm happy to go over it and make changes after a pull, but it saves time if I don't have to :)</p></li>
<li><p>Take a look at the other serialization bits in mlpack, like here: <a href="https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/logistic_regression/logistic_regression_impl.hpp#L143">https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/logistic_regression/logistic_regression_impl.hpp#L143</a> -- basically, I've implemented a big shim that lets us write <code>Serialize()</code> instead of <code>serialize()</code> for the sake of consistency.  Also, you should use <code>data::CreateNVP()</code> to create a name-value pair so that things can successfully be saved to XML archives, instead of just <code>ar &amp; member</code>.</p></li>
</ul>

<p>If you open a PR, we can discuss in more detail and probably get <a href="https://github.com/zoq" class="user-mention">@zoq</a>'s opinion, which will be the important opinion here.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/510#issuecomment-181423746">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOXlPm8oUdLo3oCaQXya-v1Zuv3Iks5piLebgaJpZM4HOq_n.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/issues/510#issuecomment-181423746"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>