<p>In <a href="https://github.com/mlpack/mlpack/pull/703#discussion_r68506617">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>> + arma::uvec z2 = arma::shuffle(lis1);
> + for (size_t i = 0; i < zs.n_rows; ++i)
> + zs(i, j) = (labels(i, z1(j)) == labels(i, z2(j))) ? 1 : 0;
> + }
> + for (size_t i = 0; i < zs.n_cols; ++i)
> + zs.row(i) -= arma::mean(zs, 0); // calculate mean about rows. n_rows = 20000.
> + size_t ind = 0;
> + arma::uvec k = arma::find(zs > 0);
> + if ( k.n_elem == 0)
> + {
> + DiscreteLabels.ones();
> + }
> + else
> + {
> + //find most representative label (closest to mean)
> + arma::vec k = arma::sum(arma::abs(zs), 0);
</pre>
<p>As pointed out here: <a href="http://arma.sourceforge.net/docs.html#sum">http://arma.sourceforge.net/docs.html#sum</a> <code>arma::sum(..., 0)</code> returns a <code>rowvec</code>, arma::vec is a <code>colvec</code>.</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/703/files/987f0790f745314a2117a87f28a346b05a8a2a2d#r68506617">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFPCAtR-ADjDAdQPLyLzx2h8HSJqCks5qPr8ugaJpZM4I5X__">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFHFYTqHghQG03O_U4eb6EZUj9BcOks5qPr8ugaJpZM4I5X__.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/703/files/987f0790f745314a2117a87f28a346b05a8a2a2d#r68506617"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>