<p>In <a href="https://github.com/mlpack/mlpack/pull/374#discussion-diff-22746823">src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp</a>:</p>
<pre style='color:#555'>> + const size_t n,
> + const size_t p)
> +{
> + const size_t mpn = m + n;
> + float r = 0.5 + sqrt(0.25 + 2 * p);
> + if (ceil(r) > mpn)
> + r = mpn; // An upper bound on the dimension.
> + return ceil(r);
> +}
> +
> +arma::mat MatrixCompletion::CreateInitialPoint(const size_t m,
> + const size_t n,
> + const size_t r)
> +{
> + const size_t mpn = m + n;
> + return arma::randu<arma::mat>(mpn, r);
</pre>
<p>Ah. Yes. I forgot about that constructor... no reason to templatize then.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/374/files#r22746823">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLpl_NUBgzvrd8GsZq0H_V4f7KpKks5ngEi3gaJpZM4DOLPX.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/374/files#r22746823"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>